-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Files.lines() is just about as fast, cleaner code.
Split the file into parts and process in parallel, runs in +/- 15 sec on M2 Pro with Java 23 EA preview Removing old version Added some branchless parsing to the mix. Improved the branchless code even further, and made it a little bit more readable. Oops. Moved to memory mapped files as well, thanks for the inspiration bjhara! Initial implementation, using BufferedReader, parallel processing, combining everything in a single go, sorting afterwards (unoptimized) Files.lines() is just about as fast, cleaner code. Split the file into parts and process in parallel, runs in +/- 15 sec on M2 Pro with Java 23 EA preview Removing old version Added some branchless parsing to the mix. Improved the branchless code even further, and made it a little bit more readable. Oops. Moved to memory mapped files as well, thanks for the inspiration bjhara! Not me, writing a custom HashMap....
- Loading branch information
1 parent
3e25828
commit ad3b443
Showing
2 changed files
with
279 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters