aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
Commit message (Collapse)AuthorAgeFilesLines
...
* Add 0xshivamagarwal Implementation (#508)Shivam Agarwal2024-01-201-0/+137
| | | | | | | | | * 0xshivamagarwal implementation * . --------- Co-authored-by: Shivam Agarwal <>
* using unsafe alone (#512)karthikeyan972024-01-201-107/+102
| | | | | | | | | | | | | | | * final comit changing using mappedbytebuffer changes before using unsafe address using unsafe * using graalvm,correct unsafe mem implementation --------- Co-authored-by: Karthikeyans <karthikeyan.sn@zohocorp.com>
* Improved version based on rafaelmerino (#511)Yann Moisan2024-01-201-0/+272
| | | | | | | | | | | * files created by create_fork.sh * use indexOf * improved implementation based on rafaelmerino --------- Co-authored-by: Yann Moisan <yann@zen.ly>
* Epsilon GC + a number of other small tweaks (#513)Roman Musin2024-01-201-72/+53
| | | | | | | | | | | | | | | | | * Version 3 * Use SWAR algorithm from netty for finding a symbol in a string * Faster equals - store the remainder in a long field (- 0.5s) * optimise parsing numbers - prep * Keep tweaking parsing logic * Rewrote number parsing may be a tiby bit faster it at all * Epsilon GC
* Introducing the vector api. 1s faster on 4 core i7 (#506)Dr Ian Preston2024-01-201-54/+50
| | | Co-authored-by: Ian Preston <ianopolous@protonmail.com>
* jerrinot's improvement (#514)Jaromir Hamala2024-01-201-84/+67
| | | | | | | * refactoring * segregated heap for names also a different hashing function. turns out hashing just first word is good enough
* yonatang solution: a jdk8 friendly, no unsafe code, epsilon-gc friendly ↵Yonatan Graber2024-01-201-0/+320
| | | | | | | | | | | | | | | | | | | solution (#499) * 1bc challenge, but one that will run using jdk 8 without unsafe and still do reasonably well. * Better hashtable * the fastest GC is no GC * cleanups * increased hash size * removed Playground.java * collision-handling allocation free hashmap * formatting
* Processing byte array backwards (#504)Xylitol2024-01-201-133/+327
|
* Use Arena MemorySegments rather than ByteBuffers. (#505)Elliot Barlas2024-01-201-120/+137
|
* Added dedicated reader (#493)Roy van Rijn2024-01-191-211/+457
| | | Started running perf, perhaps this helps. No idea how to use it yet
* Change data storage improving memory locality (#496)Juan Parera2024-01-191-100/+131
|
* low collision + fast mixer, more optimization, less if because if is slow (#474)Van Phu DO2024-01-191-58/+44
|
* plain old io (#492)Artsiom Korzun2024-01-191-54/+56
| | | plain old io
* Reduce variance by (1) Using common chunks at the end (2) Busy looping (#486)Vemana2024-01-191-88/+169
| | | | | | | | | | | | | | | | | on automatic closing of ByteBuffers.. previously, a straggler could hold up closing the ByteBuffers. Also - Improve Tracing code - Parametrize additional options to aid in tuning Our previous PR was surprising; parallelizing munmap() call did not yield anywhere near the performance gain I expected. Local machine had 10% gain while testing machine only showed 2% gain. I am still not clear why it happened and the two best theories I have are 1) Variance due to stragglers (that this change addresses) 2) munmap() is either too fast or too slow relative to the other instructions compared to our local machine. I don't know which. We'll have to use adaptive tuning, but that's in a different change.
* netrunnereve: more optimizations (#485)Eve2024-01-191-53/+67
|
* Submission #3: jincongho (#482)Jin Cong Ho2024-01-191-23/+48
|
* kumarsaurav123 # Attempt 3 (#470)kumarsaurav1232024-01-191-140/+137
| | | | | * Use Memory Segment * Reduce Number of threads
* GitHub Copilot Chat with the help of agoncal (#460)Antonio Goncalves2024-01-191-0/+153
| | | | | | | | | | | | | | | | | | | | | * v1 - Initial prompt * Introduce Records * v1 - Initial prompt * v2 - Introduce Records * v3 - Improves code * v4 - Improves JVM parameter * GitHub Copilot Chat with the help of agoncal * Format * Pass measurements-rounding * Added prepare script
* Version 4 - roman-r-m (#484)Roman Musin2024-01-191-26/+38
| | | | | | | | | | * Version 3 * trying to optimize memory access (-0.2s) - use smaller segments confined to thread - unload in parallel * Only call MemorySegment.address() once (~200ms)
* 3s (16%) faster, still no unsafe (#478)Dr Ian Preston2024-01-191-125/+199
| | | | * use Arena and MemorySegment to map entire file at once * reduced branches and instructions
* fix test rounding, pass 10K station names (#471)Jairo Graterón2024-01-191-22/+22
|
* Last attempt CalculateAverage_zerninv (#480)zerninv2024-01-191-53/+85
| | | | | * use bits magic * apply style
* jparera's initial implementation (#433)Juan Parera2024-01-171-0/+351
| | | | | | | * jparera's initial implementation * Fixes bugs and improves performance for measurements3.txt * Allows measurements.txt ending without a LF
* extract cursor interface (#458)John Ziamos2024-01-171-46/+43
| | | | | 'pull' mery kitty number parsing code try out tonne of flags (found via trial and error on my system)
* 10% improvement from parallelizing munmap(); jumps to around 12th from 16th ↵Vemana2024-01-171-70/+426
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | based on local testing; no Unsafe; no bitwise tricks yet (#465) * Squashing a bunch of commits together. Commit#2; Uplift of 7% using native byteorder from ByteBuffer. Commit#1: Minor changes to formatting. * Commit #4: Parallelize munmap() and reduce completion time further by 10%. As the jvm exits with exit(0) syscall, the kernel reclaims the memory mappings via munmap() call. Prior to this change. all the unmap() calls were happening right at the end as the JVM exited. This led to serial execution of about 350ms out of 2500 ms right at the end after each shard completed its work. We can parallelize it by exposing the Cleaner from MappedByteBuffer and then ensure that it is truly parallel execution of munmap() by using a non-blocking lock (SeqLock). The optimal strategy for when each thread must call unmap() is an interesting math problem with an exact solution and this code roughly reflects it. Commit #3: Tried out reading long at a time from bytebuffer and checking for presence of ';'.. it was slower compared to just reading int(). Removed the code for reading longs; just retaining the hasSemicolonByte(..) check code Commit #2: Introduce processLineSlow() and processRangeSlow() for the tial part. Commit #1: Create a separate tail piece of work for the last few lines to be processed separately from the main loop. This allows the main loop to read past its allocated range (by a 'long' if we reserve atleast 8 bytes for the tail piece of work.)
* My own solution -- memory mapping the files, running in parallel threads, ↵Matteo Vaccari2024-01-171-0/+261
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | using a state machine to parse the file (#466) * Golang implementation * Speed up by avoiding copying the lines * Memory mapping * Add script for testing * Now passing most of the tests * Refactor to composed method * Now using integer math throughout * Now using a state machine for parsing! * Refactoring state names * Enabling profiling * Running in parallel! * Fully parallel! * Refactor * Improve type safety of methods * The rounding problem is due to difference between Javas and Gos printf implementation * Converting my solution to Java * Merging results * Splitting the file in several buffers * Made it parallel! * Removed test file * Removed go implementation * Removed unused files * Add header to .sh file --------- Co-authored-by: Matteo Vaccari <mvaccari@thoughtworks.com>
* MahmoudFawzyKhalil's implementation (#438)MahmoudFawzyKhalil2024-01-171-0/+190
| | | | | | | * Initial commit trying out multiple things * Clean up code * Fix rounding error to fix failing test
* CalculateAverage_gonix update (#461)gonix2024-01-171-100/+70
| | | Co-authored-by: Giedrius D <d.giedrius@gmail.com>
* A fast implementation without unsafe (#462)Dr Ian Preston2024-01-171-0/+266
|
* improve equality check performance, use graal jvm (#454)zerninv2024-01-171-63/+66
|
* edge-case in hashing fixed (#459)Jaromir Hamala2024-01-171-152/+151
| | | also a bunch of smaller improvements
* Version 3 (#455)Roman Musin2024-01-171-111/+154
|
* CalculateAverage_gonix initial attempt (#413)gonix2024-01-161-0/+354
|
* karthikeyan97 implementation (#417)karthikeyan972024-01-161-0/+382
| | | Co-authored-by: Karthikeyans <karthikeyan.sn@zohocorp.com>
* plevart: Look Mom No Unsafe! (#452)Peter Levart2024-01-161-0/+405
|
* Leaderboard, formattingGunnar Morling2024-01-161-10/+10
|
* Native build, less memory acess, improved hash mixing (#449)Van Phu DO2024-01-161-78/+179
|
* Memory mapped buffers, ints instead of floats and epsilon GC (#451)adri2024-01-161-0/+223
| | | | | | | | | | | | | | | * Modify baseline version to improve performance - Consume and process stream in parallel with memory map buffers, parsing it directly - Use int instead of float/double to store values - Use Epsilon GC and graal * Update src/main/java/dev/morling/onebrc/CalculateAverage_adriacabeza.java * Update calculate_average_adriacabeza.sh --------- Co-authored-by: Gunnar Morling <gunnar.morling@googlemail.com>
* Read file in multiple threads and String to Text (#427)Anthony Goubard2024-01-161-60/+198
| | | | | | | | | | | * - Read file in multiple threads if available: 17" -> 15" locally - Changed String to BytesText with cache: 12" locally * - Fixed bug - BytesText to Text - More checks when reading the file * - Combining measurements should be thread safe - More readability changes
* armandino: second attempt (#445)Arman Sharif2024-01-161-153/+224
|
* Optimised code to iterate over non-null measurements (#444)Keshavram Kuduwa2024-01-161-94/+121
| | | Co-authored-by: Keshavram Kuduwa <keshavram.kuduwa@apptware.com>
* fix masking (#442)Artsiom Korzun2024-01-161-1/+2
| | | | | fix masking fix masking
* native version (#434)Artsiom Korzun2024-01-151-13/+23
|
* CalculateAverage_faridtmammadov (#406)Farid2024-01-151-0/+203
| | | | | | | | | | | | | * create calculate average frd * rename to mach github username * add licesnce header * make script executable --------- Co-authored-by: Farid Mammadov <farid.mammadov@simbrella.com>
* Submission #2: jincongho (#416)Jin Cong Ho2024-01-151-71/+295
|
* Improve scheduling for thomaswue (#358)Thomas Wuerthinger2024-01-151-16/+35
| | | | | * Improve scheduling for another 6%. * Tune hash function and collision handling.
* Initial 1brc version by plbpietrz (#219)Bartłomiej Pietrzyk2024-01-151-0/+273
| | | | | | | | | | | | | * Initial version * Small result merge optimisation * Switched from reading bytes to longs * Reading into internal buffer, test fixes * Licence and minor string creation optimisation * Hash collision fix
* Sixth attempt CalculateAverage_zerninv.java (#407)zerninv2024-01-151-88/+118
| | | | | * rethink chunking * fix typo
* Squashing a bunch of commits together. (#428)Vemana2024-01-151-99/+105
| | | | | | Commit#2; Uplift of 7% using native byteorder from ByteBuffer. Commit#1: Minor changes to formatting. Co-authored-by: vemana <vemana.github@gmail.com>
* Small optimizations (#426)Arjen Wisse2024-01-151-22/+25
|