Skip to content

Instantly share code, notes, and snippets.

@headius
Created May 15, 2022 14:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save headius/71e6721577872b03125f4ad2c0c024fa to your computer and use it in GitHub Desktop.
Save headius/71e6721577872b03125f4ad2c0c024fa to your computer and use it in GitHub Desktop.
IPS numbers for various Timeout impls

JRuby Java implementation

timeout default error
                        346.592k (± 5.2%) i/s -      1.747M in   5.055170s
 timeout given error    350.905k (± 5.5%) i/s -      1.775M in   5.073569s

JRuby Ruby port of Java implementation

timeout default error
                        244.307k (± 9.8%) i/s -      1.223M in   5.056898s
 timeout given error    244.061k (±11.0%) i/s -      1.227M in   5.083701s

Single-thread pure Ruby version

timeout default error
                        435.414k (± 9.5%) i/s -      2.119M in   4.987479s
 timeout given error    562.802k (±14.1%) i/s -      2.760M in   5.019670s

Thread-per-timeout version

timeout default error
                         11.832k (± 3.3%) i/s -     59.052k in   4.996574s
 timeout given error     12.193k (± 2.1%) i/s -     62.088k in   5.094398s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment