You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this statement, if station has never been encountered,mins[$1] is initialized to 0. If station has no negative value, min stays at zero, producing wrong result. Same for maxs.
Great! why don't you show us your own fix and the benchmark results?
But yeah, I had a passing thought that you need to check against a range and not a single value, but I was too tired by the end of it, and moved on to finish the rest of the AWK book instead :-)
go-1brc/1brc.awk
Line 6 in fafba32
In this statement, if station has never been encountered,
mins[$1]
is initialized to 0. If station has no negative value, min stays at zero, producing wrong result. Same for maxs.Any valid solution must test if a station already has an entry or not.
BTW, nice post. I enjoyed reading about optimizing go code using profiling.
The text was updated successfully, but these errors were encountered: