My attempt to solve the One Billion Row Challenge.
- Time: Total: 388.06s
- Logic: The most basic "read a file" line by line
- Time: Total: 370.11s
- Logic: added buffer size to scanner
- Time: Total: 329.07s
- Logic: added decode logic using bytes.IndexByte, looping - using buffer
- Time: Total: 308.56s
- Logic: pointer instead of value for result map
- Time: Total: 244.13s
- Logic: replaced float parsing with custom function
- Time: Total: 58.30s
- Logic: parallel processing of files, but with scanner and maps merging
- Time: Total: 32.77s
- Logic: replaced bufio scanner with faster implementation from v2
- Time: Total: 23.92s
- Logic: added capacity to the line slice, avoiding slice grow
- Time: Total: 20.32s
- Logic: replaced convert to string with fast string
- Time: Total: 18.57s
- Logic: instead of re-writing max or min each time, now rewrite only on change
- Time: Total: 15.45s
- Logic: reduced amount of interactions with the map
- Time: Total: 15.00s
- Logic: added map capacity, to reduce the alloc time
- Time: Total: 14.00s
- Logic: refactored map insertion logic, to reduce amount of allocations
- Time: Total: 13.12s
- Logic: custom semicolon search function, searching it from the right side
- Time: Total: 12.47
- Logic: reduced amount of iterations by 3 for semicolon search
- Time: Total: 11.08
- Logic: instead of converting []bytes to string all the time(quite expensive), moved to uint64 as a key in map
- Time: Total: 11.03
- Logic: a bit faster hash func
- Time: Total: 10.95
- Logic: faster hash
- Time: Total: 10.28
- Logic: replaced float64 with int64 for faster operations
- Time: Total: 9.66
- Logic: adjusted const limits