Commit Graph

718 Commits

Author SHA1 Message Date
Gunnar Morling
8fac59de42 #281 Trimming slowest/fastest run, not first/last in evaluate2.sh 2024-01-10 11:43:16 +01:00
Jason Nochlin
c92c88b9fb
evaluate2.sh improvements - leaderboard, default SDK
* reset the JDK to the default (21.0.1-open) when no prepare script is provided

* leaderboard improvements - sorting and content

* run sdk install once at the beginning of the script for all the SDKs detected in any of the evaluated prepare scripts

* remove unnecessary code and tweak doc comments

* one more nit

* Don't print rankings values when only 1 fork is being evaluated

* It's been a few hours, so I now have some more rate limit :)

---------

Co-authored-by: Jason Nochlin <hundredwatt@users.noreply.github.com>
2024-01-10 10:05:16 +01:00
Gunnar Morling
fa1ca65bfd
Hyperfine: Script re-org 2024-01-09 21:26:29 +01:00
Jason Nochlin
42e5ca1435
Use hyperfine and jq to improve evaluate.sh
* create new version of evaluate.sh using hyperfine + jq

* output the raw times for each command

* nit: s/command/fork/

* update evaluate2.sh for new fork file structure

* review changes

* use numactl on linux

* 1 warmup

* verify output

* leaderboard

* do not early exit on hyperfine error

* check if SMT and turbo boost are disabled

* fix bug

---------

Co-authored-by: Jason Nochlin <hundredwatt@users.noreply.github.com>
2024-01-09 20:51:59 +01:00
Gunnar Morling
2c0e551cec
Update README.md 2024-01-09 14:11:31 +01:00
Dimitar Dimitrov
6fd55dee6e Committing line separator changes on Linux systems (enforced by gitattr). 2024-01-08 12:17:23 +01:00
Dimitar Dimitrov
23913da5a0 Added UseTransparentHugePages after testing on a box 2024-01-07 21:19:18 +01:00
Daniel Avery
82cb32946e
Add davery22 impl 2024-01-07 21:14:04 +01:00
Gunnar Morling
83373c93fb Leaderboard update 2024-01-07 20:55:55 +01:00
Jamie Stansfield
dbd8ca4562
isolgpus: submission 2 - about a 25% improvement on submission 1. (#168)
* isolgpus: fix chunk sizing when not at 8 threads
use as many cores as are available
don't buffer the station name, only use it when we need it.
get rid of the main branch
move variables inside the loop

* isolgpus: optimistically assume we can read a whole int for the station name, but roll back if we get it wrong. This should be very beneficial on a dataset where station names are mostly over 4 chars

---------

Co-authored-by: Jamie Stansfield <jalstansfield@gmail.com>
2024-01-07 20:55:30 +01:00
Gunnar Morling
22d8580ac8 Leaderboard update 2024-01-07 20:50:42 +01:00
Thomas Wuerthinger
243388ad7b
Use SIMD for search for delimiter and name compare 2024-01-07 20:50:11 +01:00
김예환 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