Commit Graph

242 Commits

Author SHA1 Message Date
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
Marko Topolnik
0f1f204a0d Generate measurements with random names
Name length goes from 1 to 100.
2024-01-06 10:35:44 +01:00
Gunnar Morling
d8b300b677 Leaderboard update 2024-01-06 00:25:47 +01:00
Abhilash
ba1999cddf 1 brc - 2gb memory 1 min 31 secs 2024-01-06 00:25:15 +01:00
twobiers
c24bcac047 Adjust buffer size to solve test failure in #125 2024-01-06 00:12:36 +01:00
Gunnar Morling
e1f6a29f42 Leaderboard update 2024-01-05 23:52:18 +01:00
Yavuz Tas
f6acc6f3d5
A solution with Actor Model concurrency and MappedByteBuffer
* A solution with Actor Model concurrency and MappedByteBuffer

* fix test cases

* revert back the file name to original

* cache String hashCode calculation via composing with Key object

* fix wrong key caching and eleminate duplicate String creation between actors

* update possible char count in a line, fix calculate_average.sh

* increase possible line length to 256 bytes, much safer to cover 100 chars I hope

---------

Co-authored-by: Yavuz Tas <yavuz.tas@ing.com>
2024-01-05 23:50:58 +01:00
Roman Schweitzer
5f4ed31fec
CalculateAverage_truelive second attempt
* cleanup

* getDouble new double parser

* parseBuffer more reliable

* use graalvm to execute

* cleanup

* cleanup

* fix formatting

* fix graalvm init and launch script
2024-01-05 23:40:03 +01:00
Gunnar Morling
13a385c2e6 Leaderboard update 2024-01-05 23:29:07 +01:00
Parth Mudgal
72ad94d6c2
artpar's attempt
* artpar's attempt

* artpar's attempt

* remove int -> Integer conversions, custom parsing for measurements

* remove allocations by caching station names
also remove Integer and use int instead to remove valueOf calls

* Fix result mismatch errors

* parse int instead of double

* reduce time spent reading the mapped buffer

* cleanup unused memory

* less is faster ? vector addition doesn't look worth it

* backout from virtual threads as well

* Fix breaking tests
2024-01-05 23:28:38 +01:00
greid
d3e88219f0 gabrielreid's first attempt
Somewhat mixed collection of multiple ideas, mostly based initially
on using the new JDK Vector API for extracting offsets of newlines
and semicolons.

Runs locally in just under 11 seconds on 1B rows of input on a
2020 M1 Macbook Air.
2024-01-05 23:19:02 +01:00
Jamie Stansfield
4614b81eb6
isolgpus: submission 1
* isolgpus: submission 1

* isolgpus: fix min value bug (breaks if a negative temperature never appears)

* isolgpus: remove unused collector

* isolgpus: fix split on chunk bug

* isolgpus: change name equality algo to a cheaper check.

* isolgpus: fix chunking state to cope with last byte of last chunk

* isolgpus: hash as we go, instead of at the end

* isolgpus: adjust thread count to core count

* isolgpus: change cores to 8 statically

---------

Co-authored-by: Jamie Stansfield <jalstansfield@gmail.com>
2024-01-05 23:10:43 +01:00
Yunus Inci
4fe00bf7a7 Improve spullara's solution 2024-01-05 23:00:43 +01:00
Johannes Schüth
22b5435893 Adding Johannes Schüth's submission 2024-01-05 22:52:39 +01:00
Gunnar Morling
c0131d647e Leaderboard update 2024-01-05 20:27:02 +01:00