Commit Graph

238 Commits

Author SHA1 Message Date
greid
08af2622d3 gabrielreid take 2
Clear up some TODOS, simplify the code a bit, which appears to
result in a 25% performance increase.
2024-01-10 20:43:46 +01:00
Stefan Sprenger
a8a3876416
Second submission by flippingbits - 50% performance improvement
* feat(flippingbits): Improve parsing of measurement and few cleanups

* feat(flippingbits): Reduce chunk size to 10MB

* feat(flippingbits): Improve parsing of station names

* chore(flippingbits): Remove obsolete import

* chore(flippingbits): Few cleanups
2024-01-10 20:36:22 +01:00
Quan Anh Mai
97b1f014ad
merykitty's second attempt 2024-01-10 20:24:19 +01:00
Gunnar Morling
786a52034c Leaderboard update 2024-01-10 20:24:02 +01:00
Elliot Barlas
44414a33dc Consume four bytes at a time from buffer using getInt. Store key with unsafe int array rather than byte array. Use custom equals rather than Arrays equals. 2024-01-10 20:03:14 +01:00
Gunnar Morling
c89490aaa1 Leaderboard update 2024-01-10 19:43:14 +01:00
Thomas Wuerthinger
af66ac145f
Second tuning for thomaswue
* Optimize checking for collisions by doing this a long at a time always.

* Use a long at a time scanning for delimiter.

* Minor tuning. Now below 0.80s on Intel i9-13900K.

* Add number parsing code from Quan Anh Mai. Fix name length issue.

* Include suggestion from Alfonso Peterssen for another 1.5%.

* Optimize hash collision check compare for ~4% gain.

* Add perf stats based on latest version.
2024-01-10 19:42:51 +01:00
Gunnar Morling
2bfd8f90bc Removing nstng's entry as he's retracting from the challenge 2024-01-10 19:35:49 +01:00
Nils Semmelrock
a421ad5dbf Revert "Adding Nils Semmelrock's submission"
This reverts commit 12ae36ad
2024-01-10 19:33:52 +01:00
Gunnar Morling
ed6b077819 Leaderboard update -- Backfilling remaining entries 2024-01-10 18:25:27 +01:00
Alexander Yastrebov
af269e39fc Update test*.sh to support input file pattern
This is useful for testing fork(s) against subset of test samples
2024-01-10 17:53:13 +01:00
Gunnar Morling
4df425fb9b New leaderboard (WIP) after environment change 2024-01-10 17:37:02 +01:00
Jason Nochlin
e45c338f0e more robust error message 2024-01-10 16:01:07 +01:00
Jason Nochlin
a8ebaf1a59 catch hyperfine command failed 2024-01-10 16:01:07 +01:00
Alexander Yastrebov
a08cd0e05a Add small test cases
For https://github.com/gunnarmorling/1brc/issues/276
2024-01-10 15:48:42 +01:00
Jason Nochlin
6ee7f2d0b0 remove debug line 2024-01-10 15:26:19 +01:00
Jason Nochlin
08d99c38e5 Validate that ./calculate_average_<fork>.sh exists for each fork 2024-01-10 15:26:19 +01:00
Jason Nochlin
7c81bfec70 grep returns exit code 1 when no match, || true prevents the script from exiting early 2024-01-10 15:26:19 +01:00
Alexander Yastrebov
7def69eee7 Fix test.sh to use prepare script 2024-01-10 14:29:18 +01:00
Gunnar Morling
7a617720ad
Update README.md 2024-01-10 12:41:08 +01:00
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