Commit Graph

606 Commits

Author SHA1 Message Date
김예환 Ye-Hwan Kim (Sam)
9e9e533401
Add yehwankim23 (#148) 2024-01-07 20:41:41 +01:00
Olivier Bourgain
143132e8df
My implementation is in dev.morling.onebrc.CalculateAverage_obourgain and runnable with provided script calculate_average_obourgain.sh (#75)
Runs with standard JDK 21.

On my computers (i5 13500, 20 cores, 32GB ram) my best run is (file fully in page cache):
49.78user 0.69system 0:02.81elapsed 1795%CPU

A bit older version of the code on Mac pro  M1 32 GB:
real	0m2.867s
user	0m23.956s
sys	0m1.329s

As I wrote in comments in the code, I have a few different roundings that the reference implementation. I have seend that there is an issue about that, but no specific rule yet.

Main points:
- use MemorySegment, it's faster than ByteBuffer
- split the work in a lot of chunks and distribute to a thread pool
- fast measurement parser by using a lot of domain knowledge
- very low allocation
- visit each byte only once

Things I tried that were in fact pessimizations:
- use some internal JDK code to vectorize the hashCode computation
- use a MemorySegment to represent the keys instead of byte[], to avoid
  copying

Hope I won't have a bad surprise when running on the target server 😱
2024-01-07 20:15:53 +01:00
Gunnar Morling
2bb4431106 Leaderboard update 2024-01-07 19:49:36 +01:00
Roy van Rijn
e665d71549
Roy: Adding a bit of unsafe...
Co-authored-by: Gunnar Morling <gunnar.morling@googlemail.com>
2024-01-07 19:41:43 +01:00
Gunnar Morling
ff7d4a1750 Removing App CDS from Roy's submission 2024-01-07 19:40:13 +01:00
Gunnar Morling
0e4c58e4b8 Leaderboard update 2024-01-07 19:30:55 +01:00
ags
990483dcc8 first attempt 2024-01-07 12:09:43 +01:00
Gunnar Morling
eaa503425c Leaderboard update 2024-01-07 11:40:26 +01:00
Cool_Mineman
d89d1b488d
Initial Implementation - coolmineman (#196)
* start

* slower

* still bad

* finally faster than baseline :)

* starting to go fast

* improve

* we ball

* fix race condition an newline

* change threadpool

* ~18sec on my machine
2024-01-07 11:39:45 +01:00
Gunnar Morling
fc675c4614
Update pull_request_template.md 2024-01-07 11:34:38 +01:00
Gunnar Morling
aaaf6bfb92 Leaderboard update 2024-01-07 11:13:39 +01:00
Kevin McMurtrie
2e1fba5a92
1brc submission - Kevin McMurtrie (#195)
* v1

* Fix sorting
2024-01-07 11:12:57 +01:00
John
96d1050a8c An implementation optimised for simplicity/readability. 2024-01-07 11:04:49 +01:00
Gunnar Morling
96efccfb49 Leaderboard update 2024-01-07 10:58:05 +01:00
Serghei Motpan
6b3027955a CalculateAverage semotpan attempt 1 2024-01-07 10:57:34 +01:00
Santanu Barua
85fa0891bc
Implements CalculateAverage_santanu.java
Execution time: 1 minute and 27.863 seconds
System specs: Apple M1, 8 cores, 16GB RAM

Co-authored-by: santanu barua <santanu@host109.private.net>
2024-01-07 10:40:18 +01:00
Keshavram Kuduwa
78b3415678
Optimised Code to use FileSegments with ByteBuffer (#184)
* Keshavram Kuduwa's Submission

* Resolves #102 and Code Optimizations

* Resolves #102 and Code Optimizations

* Optimised Code with Roy's Reference

* Fixed Tests

* Clean Up Code

---------

Co-authored-by: Keshavram Kuduwa <keshavram.kuduwa@apptware.com>
2024-01-07 10:11:56 +01:00
Elliot Barlas
c13997c9e0
Continue unrolling and inlining value parser. Make targeted use of ByteBuffer.getInt() instead of ByteBuffer.get(). Switch from GraalVM CE to GraalVM. (#201) 2024-01-07 10:05:18 +01:00
Andrew Sun
aa0395d01b
Add entry by Andrew Sun 2024-01-07 10:00:58 +01:00
Carlo
3ebc7d2b9c
Experiment from entangled90
* single thread memory mapped file reader, pool of processors

* cleanup of inner classes of MetricProcessor

* doubles are parsed without external functions, strings are lazily created from byte arrays

* remove load() MappedByteBuffer in memory

* fixed handling of newline

* fix a bug & correct locale used

* MappedByteBuffer size set to 1MB

* fixed rounding

* Do not use ArrayBlockingQueue.offer since it drops elements when queue is full

* MappedByteBuffer size = 32 MB
2024-01-07 09:50:34 +01:00
Gergely Kiss
c72a8e9769
Adding kgeri's solution (#137)
* Adding kgeri's solution

* parallelizing CalculatorAverage_kgeri

* fixing aggregation bugs, chunk size calc for small files

* removed GC logging

Co-authored-by: Gunnar Morling <gunnar.morling@googlemail.com>

* fix for when there's no newline at end of input

* fix for when the final record ends on the chunk boundary

---------

Co-authored-by: Gunnar Morling <gunnar.morling@googlemail.com>
2024-01-07 09:45:30 +01:00
Gunnar Morling
15511d1af2 Infra 2024-01-07 09:40:09 +01:00
Gunnar Morling
fe61b354fd Infra 2024-01-07 09:24:21 +01:00
Gunnar Morling
f99d20b3da Leaderboard update 2024-01-06 19:26:51 +01:00
Dimitar Dimitrov
14918bb306
ddimtirov - supporting hash collisions, should have fixed #101
* ddimtirov - supporting hash collisions, should have fixed #101
* Make life easier for Windows user who need to use WSL to run the tests
2024-01-06 19:24:48 +01:00
Yavuz Tas
e8b2d2d7b4
Improvement in CalculateAverage_yavuztas (#162)
* improve double reading by eleminating string parsing in between, make calculations over on integer instead of double, parse into double at the end only once

* more improvements, sharing a single StringBuilder to build all toStrings, minor performance gain.

* micro optimizations on reading temperature

* a small skip for redundant traverses, micro optmization

* micro optimization, eleminate some if cases, saves 0.5 seconds more

* micro optimization, calculate key hash ahead eleminates more more loop, saves 0.5 seconds more :)

* optimize key equals and handling the case when a region is larger than max integer size

---------

Co-authored-by: Yavuz Tas <yavuz.tas@ing.com>
2024-01-06 19:09:16 +01:00
Mudit Saxena
9879ff5034
Mudit/initial attempt (#41)
* Initial version with multiple ideas

* Added virtual thread implementation based on certain task size

* Removed evaluate file

* Fixed test issues

* Added a custom input split
2024-01-06 18:54:37 +01:00
Gunnar Morling
b8b96a2b34 Updating leaderboard 2024-01-06 18:40:44 +01:00
Gunnar Morling
32bef5ac96 Updating leaderboard, formatting, avoiding OOME 2024-01-06 18:20:44 +01:00
Rafael Merino García
40acde7dd5
my first try to 1BRC!
* first try

* format

* Update calculate_average_imrafaelmerino.sh

Co-authored-by: Gunnar Morling <gunnar.morling@googlemail.com>

* Update src/main/java/dev/morling/onebrc/CalculateAverage_imrafaelmerino.java

Co-authored-by: Gunnar Morling <gunnar.morling@googlemail.com>

---------

Co-authored-by: Rafael Merino García <imrafaelmerino@gmail.com>
Co-authored-by: Gunnar Morling <gunnar.morling@googlemail.com>
2024-01-06 18:18:54 +01:00
Stefan Sprenger
749d2d8f78
Add solution by flippingbits - Use SIMD for computing aggregates
* feat(flippingbits): First revision

* chore(flippingbits): Clean up output

* fix(flippingbits): Use ShortVector.SPECIES_MAX
2024-01-06 18:13:52 +01:00
Horia Chiorean
1a9b1cb7da
hchiorean - Initial version
* Initial version

* Removed some System out messages and tweaked some config values

* Added some fixes and some tweaks
2024-01-06 17:59:49 +01:00
Gunnar Morling
e66a2c96a3 Leaderboard update 2024-01-06 17:03:45 +01:00
Quan Anh Mai
4fc6034812
merykitty's attempt
* first commit

* fix test

* concurrency

* format for easier to follow explanation

* fix large keys

* fix overlapping ranges

* prefetch file

* add comments, remove prefetching

* typo
2024-01-06 17:01:12 +01:00
Gunnar Morling
241d32817e
Update README.md 2024-01-06 14:34:46 +01:00
Gunnar Morling
a3626e589f
Update README.md 2024-01-06 14:33:35 +01:00
Gunnar Morling
580a30d3d7
Update README.md 2024-01-06 14:33:09 +01:00
Bruno Félix
6eb8b49b7c
Implementation of 1brc - felix19350 (#53)
* Implementation of 1brc - felix19350

* Added license header

* Fixed failing tests

* Replaced parsing of doubles with a custom parser and integer arithmetic

---------

Co-authored-by: Bruno Felix <bruno.felix@klarna.com>
2024-01-06 11:27:30 +01:00
Michael Berry
38fc317073 Fix #159 2024-01-06 11:05:36 +01:00
Gunnar Morling
fd0bb3a072 Leaderboard update 2024-01-06 10:55:54 +01:00
Thomas Wuerthinger
a53aa2e6fd
Initial version for thomaswue with Oracle GraalVM Native Image
* Initial version.

* Make PGO feature optional off-by-default. Needs PGO_MODE environment
variable to be set. Add -O3 -march=native tuning flags for better
performance.

* Adjust script to be more quiet.

* Adjust max city length. Fix an issue when accumulating results.

* Tune thomaswue submission.
mmap the entire file, use Unsafe directly instead of ByteBuffer, avoid byte[] copies.
These tricks give a ~30% speedup, over an already fast implementation.

* Optimize parsing of numbers based on specific given constraints.

* Fix for segment calculation for case of very small input.

* Minor shell script fixes.

* Separate out build step into file additional_build_step_thomaswue.sh,
simplify run script and remove PGO option for now.

* Minor corrections to the run script.

---------

Co-authored-by: Alfonso² Peterssen <alfonso.peterssen@oracle.com>
2024-01-06 10:55:07 +01:00
Markus Ebner
093bd35c44 seijikun: Fix new unit-test introduced with #125 2024-01-06 10:39:19 +01:00
Gunnar Morling
88c82d3740 Adding missing ")" 2024-01-06 10:36:19 +01:00
Marko Topolnik
35b90992aa More detailed attribution 2024-01-06 10:35:44 +01:00
Marko Topolnik
7ec968d3bb One more sample in test file 2024-01-06 10:35:44 +01:00
Marko Topolnik
eccc8f9097 Improve name generation 2024-01-06 10:35:44 +01:00
Marko Topolnik
e09cb7deea Limit names to 100 bytes 2024-01-06 10:35:44 +01:00
Marko Topolnik
a094d07925 Move attribution into weather_stations.csv 2024-01-06 10:35:44 +01:00
Marko Topolnik
d7456c6ff9 Add test sample with a worst-case UTF-8 name 2024-01-06 10:35:44 +01:00
Marko Topolnik
816e59b678 Eliminate duplicate station names 2024-01-06 10:35:44 +01:00