Skip to content

Add JVM flags for more consistent (and typically faster) timing #437 - #505

Merged
pehrsoderman merged 1 commit into
Kattis:masterfrom
gkreitz:437_jvm_options
Oct 15, 2026
Merged

pehrsoderman merged 1 commit into
Kattis:masterfrom
gkreitz:437_jvm_options

Conversation

@gkreitz

@gkreitz gkreitz commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

Adds JVM command line options to:

  • spend less CPU optimizing (this seems to yield a speed-up for the vast majority of submissions)
  • pretend there's a fixed number of CPU cores, to get more consistent performance even when run on high core machines

Rejudging submissions on Kattis hardware, we had the following statistics when evaluating this change - the typical result is a quite significant speed-up, even if a few submissions do become slower.

--- Runtime by Language ---
Language       N    Med old    Med new    Med Δ    Geo ratio    p10 ratio    p90 ratio  >10% slower    >10% faster
----------  ----  ---------  ---------  -------  -----------  -----------  -----------  -------------  -------------
Java        1597      0.103      0.076   -0.022        0.711         0.46         0.89  54 (3%)        1465 (92%)
ALL         1597      0.103      0.076   -0.022        0.711         0.46         0.89  54 (3%)        1465 (92%)

--- Distribution of runtime ratio (new/old) ---
Ratio           Count  Percentage
------------  -------  ------------  ----------------------------------------
[0.00, 0.50)      214  13.4%         ############
[0.50, 0.80)      710  44.5%         ########################################
[0.80, 0.90)      532  33.3%         ##############################
[0.90, 0.95)       39  2.4%          ##
[0.95, 1.05)       40  2.5%          ##
[1.05, 1.10)        8  0.5%
[1.10, 1.25)       23  1.4%          #
[1.25, 2.00)       27  1.7%          ##
[2.00, ∞)           4  0.3%

Thanks @Tagl for raising the issue!

Fixes #437

@pehrsoderman
pehrsoderman merged commit 1f5bf92 into Kattis:master Oct 15, 2026
7 checks 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.

Java running time is not accurate

2 participants