Skip to content

Avoid IO in benchmarks by preloading class path into memory#2

Draft
mbovel wants to merge 3 commits intomainfrom
mb/preloaded-classpath
Draft

Avoid IO in benchmarks by preloading class path into memory#2
mbovel wants to merge 3 commits intomainfrom
mb/preloaded-classpath

Conversation

@mbovel
Copy link
Member

@mbovel mbovel commented Dec 2, 2025

No description provided.

mbovel and others added 3 commits December 2, 2025 17:21
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <81847+claude@users.noreply.github.com>
Also preload JDK runtime classes (java.*, etc.) into VirtualDirectory
to eliminate all I/O during benchmark iterations.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@mbovel
Copy link
Member Author

mbovel commented Dec 2, 2025

3.3.4, full class path in memory:

[info] Result "bench.CompilationBenchmarks.helloWorld":
[info]   N = 20
[info]   mean =     42.398 ±(99.9%) 2.448 ms/op
[info]   Histogram, ms/op:
[info]     [37.000, 38.000) = 3 
[info]     [38.000, 39.000) = 1 
[info]     [39.000, 40.000) = 0 
[info]     [40.000, 41.000) = 0 
[info]     [41.000, 42.000) = 2 
[info]     [42.000, 43.000) = 4 
[info]     [43.000, 44.000) = 5 
[info]     [44.000, 45.000) = 3 
[info]     [45.000, 46.000) = 1 

3.7.4, full class path in memory:

[info] Result "bench.CompilationBenchmarks.helloWorld":
[info]   N = 20
[info]   mean =     46.553 ±(99.9%) 2.328 ms/op
[info]   Histogram, ms/op:
[info]     [40.000, 41.250) = 2 
[info]     [41.250, 42.500) = 0 
[info]     [42.500, 43.750) = 1 
[info]     [43.750, 45.000) = 1 
[info]     [45.000, 46.250) = 4 
[info]     [46.250, 47.500) = 5 
[info]     [47.500, 48.750) = 6 
[info]     [48.750, 50.000) = 0 
[info]     [50.000, 51.250) = 0 
[info]     [51.250, 52.500) = 1 
[info]     [52.500, 53.750) = 0 
[info]     [53.750, 55.000) = 0 
[info]     [55.000, 56.250) = 0 
[info]     [56.250, 57.500) = 0 
[info]     [57.500, 58.750) = 0 

3.7.4, non-jrt class path in memory:

[info] Result "bench.CompilationBenchmarks.helloWorld":
[info]   N = 20
[info]   mean =     61.330 ±(99.9%) 1.783 ms/op
[info]   Histogram, ms/op:
[info]     [55.000, 55.500) = 0 
[info]     [55.500, 56.000) = 1 
[info]     [56.000, 56.500) = 0 
[info]     [56.500, 57.000) = 1 
[info]     [57.000, 57.500) = 0 
[info]     [57.500, 58.000) = 0 
[info]     [58.000, 58.500) = 0 
[info]     [58.500, 59.000) = 0 
[info]     [59.000, 59.500) = 0 
[info]     [59.500, 60.000) = 1 
[info]     [60.000, 60.500) = 0 
[info]     [60.500, 61.000) = 3 
[info]     [61.000, 61.500) = 3 
[info]     [61.500, 62.000) = 2 
[info]     [62.000, 62.500) = 4 
[info]     [62.500, 63.000) = 1 
[info]     [63.000, 63.500) = 3

3.7.4, default classpath:

[info] Result "bench.CompilationBenchmarks.helloWorld":
[info]   N = 20
[info]   mean =     76.672 ±(99.9%) 3.347 ms/op
[info]   Histogram, ms/op:
[info]     [60.000, 62.500) = 0 
[info]     [62.500, 65.000) = 1 
[info]     [65.000, 67.500) = 0 
[info]     [67.500, 70.000) = 0 
[info]     [70.000, 72.500) = 1 
[info]     [72.500, 75.000) = 2 
[info]     [75.000, 77.500) = 7 
[info]     [77.500, 80.000) = 4 
[info]     [80.000, 82.500) = 5 
[info]     [82.500, 85.000) = 0 
[info]     [85.000, 87.500) = 0 

@mbovel mbovel force-pushed the main branch 2 times, most recently from 2a521b8 to 8966c2f Compare December 5, 2025 17:01
@mbovel mbovel marked this pull request as draft December 9, 2025 21:19
@mbovel mbovel force-pushed the main branch 11 times, most recently from ad1cec1 to 9560829 Compare February 5, 2026 17:44
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.

1 participant