Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert original map to improve 10K #662

Merged
merged 1 commit into from
Jan 31, 2024

Conversation

artsiomkorzun
Copy link
Contributor

Check List:

  • You have run ./mvnw verify and the project builds successfully
  • Tests pass (./test.sh <username> shows no differences between expected and actual outputs)
  • All formatting changes by the build are committed
  • Your launch script is named calculate_average_<username>.sh (make sure to match casing of your GH user name) and is executable
  • Output matches that of calculate_average_baseline.sh
  • For new entries, or after substantial changes: When implementing custom hash structures, please point to where you deal with hash collisions (line number)
  • Execution time: -
  • Execution time of reference implementation: -

Reverting map structure to restore 10K performance.

@artsiomkorzun artsiomkorzun force-pushed the revert-map branch 2 times, most recently from e2db649 to 5476523 Compare January 30, 2024 19:41
@gunnarmorling
Copy link
Owner

No difference for the standard key set, but 10K key set is actually slower. Standard:

Benchmark 1: timeout -v 300 ./calculate_average_artsiomkorzun.sh 2>&1
  Time (mean ± σ):      1.924 s ±  0.015 s    [User: 0.001 s, System: 0.004 s]
  Range (min … max):    1.898 s …  1.935 s    5 runs

  Warning: Statistical outliers were detected. Consider re-running this benchmark on a quiet system without any interferences from other programs. It might help to use the '--warmup' or '--prepare' options.

Summary
  artsiomkorzun: trimmed mean 1.9286819972533333, raw times 1.8975089989200002,1.9284043529200001,1.9350505949200003,1.9297026599200002,1.92793897892

Leaderboard

| # | Result (m:s.ms) | Implementation     | JDK | Submitter     | Notes     |
|---|-----------------|--------------------|-----|---------------|-----------|
|   | 00:01.928 | [link](https://github.com/gunnarmorling/1brc/blob/main/src/main/java/dev/morling/onebrc/CalculateAverage_artsiomkorzun.java)| 21.0.2-graal | [Artsiom Korzun](https://github.com/artsiomkorzun) | GraalVM native binary, uses Unsafe |

10K:

Benchmark 1: timeout -v 300 ./calculate_average_artsiomkorzun.sh 2>&1
  Time (mean ± σ):      3.179 s ±  0.022 s    [User: 0.001 s, System: 0.005 s]
  Range (min … max):    3.142 s …  3.198 s    5 runs

Summary
  artsiomkorzun: trimmed mean 3.1842617462133336, raw times 3.14171556288,3.19848109988,3.18802885388,3.1825212398800002,3.18223514488

Leaderboard

| # | Result (m:s.ms) | Implementation     | JDK | Submitter     | Notes     |
|---|-----------------|--------------------|-----|---------------|-----------|
|   | 00:03.184 | [link](https://github.com/gunnarmorling/1brc/blob/main/src/main/java/dev/morling/onebrc/CalculateAverage_artsiomkorzun.java)| 21.0.2-graal | [Artsiom Korzun](https://github.com/artsiomkorzun) | GraalVM native binary, uses Unsafe |

@artsiomkorzun
Copy link
Contributor Author

artsiomkorzun commented Jan 31, 2024

@gunnarmorling what time is for the current entry 29 Jan? I only see the time for 27 Jan.

@artsiomkorzun
Copy link
Contributor Author

@gunnarmorling can you please test 413 case one more time? I picked up the compiler's setting from Thomas. Maybe something will change.

@gunnarmorling
Copy link
Owner

Yes, looking much better now:

Benchmark 1: timeout -v 300 ./calculate_average_artsiomkorzun.sh 2>&1
  Time (mean ± σ):      1.846 s ±  0.018 s    [User: 0.002 s, System: 0.003 s]
  Range (min … max):    1.815 s …  1.863 s    5 runs

  Warning: Statistical outliers were detected. Consider re-running this benchmark on a quiet system without any interferences from other programs. It might help to use the '--warmup' or '--prepare' options.

Summary
  artsiomkorzun: trimmed mean 1.8510420830066667, raw times 1.8148779293400001,1.8510192823400002,1.84887277834,1.86337728234,1.85323418834

Leaderboard

| # | Result (m:s.ms) | Implementation     | JDK | Submitter     | Notes     |
|---|-----------------|--------------------|-----|---------------|-----------|
|   | 00:01.851 | [link](https://github.com/gunnarmorling/1brc/blob/main/src/main/java/dev/morling/onebrc/CalculateAverage_artsiomkorzun.java)| 21.0.2-graal | [Artsiom Korzun](https://github.com/artsiomkorzun) | GraalVM native binary, uses Unsafe |

Also back to the previous level for 10K.

@gunnarmorling gunnarmorling merged commit e81326b into gunnarmorling:main Jan 31, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants