Skip to content

Java running time is not accurate #437

Description

@Tagl

Java seems to do something with threads even though the code run is completely single threaded. It's not enough to just force the garbage collector to be single threaded.
For most people this is probably not a significant timing issue, but seems easy to fix.
On a 128-core (256-virtual) machine it does cause massive issues.
My timing went down from 57s to 0.3s by adding the flag -XX:ActiveProcessorCount=1 to languages.yaml

On a 6-core (6-virtual) machine it seems to be able to cause the reported running time to be approximately double the actual running time.

Java is however often I/O bound in my experience in competitive programming setting so this may not be extremely common.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions