-
-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
41 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,104 +1,74 @@ | ||
## Ruby 2.6.10 | ||
|
||
``` | ||
samuel@aiko ~/P/i/benchmarks> ruby fiber-creation.rb | ||
samuel@aiko ~/P/s/a/b/core (main)> ruby fiber-creation.rb | ||
2.6.10 | ||
Fiber creation duration: 0.03247421991545707 seconds | ||
Fiber resume duration: 0.033807114930823445 seconds | ||
Fiber creation duration: 0.03336292295716703 seconds | ||
Fiber resume duration: 0.03446975699625909 seconds | ||
Fiber creation duration: 0.036547233001329005 seconds | ||
Fiber resume duration: 0.037760776933282614 seconds | ||
samuel@aiko ~/P/i/benchmarks> ruby thread-creation.rb | ||
Fiber duration: 4.31us | ||
Fiber duration: 3.88us | ||
Fiber duration: 3.45us | ||
samuel@aiko ~/P/s/a/b/core (main)> ruby thread-creation.rb | ||
2.6.10 | ||
Thread creation duration: 0.3327406020835042 seconds | ||
Thread join duration: 0.3362921440275386 seconds | ||
Thread creation duration: 0.28885943605564535 seconds | ||
Thread join duration: 0.3024547479581088 seconds | ||
Thread creation duration: 0.28072248096577823 seconds | ||
Thread join duration: 0.2932344099972397 seconds | ||
Thread duration: 48.68us | ||
Thread duration: 44.09us | ||
Thread duration: 47.51us | ||
``` | ||
|
||
## Ruby 2.7.7 | ||
|
||
``` | ||
samuel@aiko ~/P/i/benchmarks> ruby fiber-creation.rb | ||
samuel@aiko ~/P/s/a/b/core (main)> ruby fiber-creation.rb | ||
2.7.7 | ||
Fiber creation duration: 0.004129973007366061 seconds | ||
Fiber resume duration: 0.009417430032044649 seconds | ||
Fiber creation duration: 0.00369942095130682 seconds | ||
Fiber resume duration: 0.008967867936007679 seconds | ||
Fiber creation duration: 0.0028550089336931705 seconds | ||
Fiber resume duration: 0.00814394501503557 seconds | ||
samuel@aiko ~/P/i/benchmarks> ruby thread-creation.rb | ||
Fiber duration: 0.94us | ||
Fiber duration: 0.85us | ||
Fiber duration: 0.79us | ||
samuel@aiko ~/P/s/a/b/core (main)> ruby thread-creation.rb | ||
2.7.7 | ||
Thread creation duration: 0.14376470306888223 seconds | ||
Thread join duration: 0.15650222299154848 seconds | ||
Thread creation duration: 0.05303007597103715 seconds | ||
Thread join duration: 0.10422574798576534 seconds | ||
Thread creation duration: 0.019414776004850864 seconds | ||
Thread join duration: 0.08457108191214502 seconds | ||
Thread duration: 13.4us | ||
Thread duration: 11.18us | ||
Thread duration: 10.76us | ||
``` | ||
|
||
## Ruby 3.0.4 | ||
|
||
``` | ||
samuel@aiko ~/P/i/benchmarks> ruby fiber-creation.rb | ||
samuel@aiko ~/P/s/a/b/core (main)> ruby fiber-creation.rb | ||
3.0.4 | ||
Fiber creation duration: 0.00412312091793865 seconds | ||
Fiber resume duration: 0.009137733955867589 seconds | ||
Fiber creation duration: 0.003599958959966898 seconds | ||
Fiber resume duration: 0.00864996190648526 seconds | ||
Fiber creation duration: 0.0029245070181787014 seconds | ||
Fiber resume duration: 0.008252070983871818 seconds | ||
samuel@aiko ~/P/i/benchmarks> ruby thread-creation.rb | ||
Fiber duration: 0.84us | ||
Fiber duration: 0.81us | ||
Fiber duration: 0.91us | ||
samuel@aiko ~/P/s/a/b/core (main)> ruby thread-creation.rb | ||
3.0.4 | ||
Thread creation duration: 0.15326495608314872 seconds | ||
Thread join duration: 0.1620923290029168 seconds | ||
Thread creation duration: 0.04059368500020355 seconds | ||
Thread join duration: 0.09797750308644027 seconds | ||
Thread creation duration: 0.026068986975587904 seconds | ||
Thread join duration: 0.08405434701126069 seconds | ||
Thread duration: 13.5us | ||
Thread duration: 11.14us | ||
Thread duration: 9.68us | ||
``` | ||
|
||
## Ruby 3.1.3 | ||
|
||
``` | ||
samuel@aiko ~/P/i/benchmarks> ruby fiber-creation.rb | ||
samuel@aiko ~/P/s/a/b/core (main)> ruby fiber-creation.rb | ||
3.1.3 | ||
Fiber creation duration: 0.00456259201746434 seconds | ||
Fiber resume duration: 0.009786766022443771 seconds | ||
Fiber creation duration: 0.003958209999836981 seconds | ||
Fiber resume duration: 0.009175294078886509 seconds | ||
Fiber creation duration: 0.003569778986275196 seconds | ||
Fiber resume duration: 0.008846142911352217 seconds | ||
samuel@aiko ~/P/i/benchmarks> ruby thread-creation.rb | ||
Fiber duration: 0.91us | ||
Fiber duration: 0.87us | ||
Fiber duration: 0.84us | ||
samuel@aiko ~/P/s/a/b/core (main)> ruby thread-creation.rb | ||
3.1.3 | ||
Thread creation duration: 0.14986835094168782 seconds | ||
Thread join duration: 0.16197327291592956 seconds | ||
Thread creation duration: 0.055374343995936215 seconds | ||
Thread join duration: 0.11033689801115543 seconds | ||
Thread creation duration: 0.02628220897167921 seconds | ||
Thread join duration: 0.08593441394623369 seconds | ||
Thread duration: 13.18us | ||
Thread duration: 11.85us | ||
Thread duration: 11.35us | ||
``` | ||
|
||
## Ruby 3.2.1 | ||
|
||
``` | ||
samuel@aiko ~/P/i/benchmarks> ruby fiber-creation.rb | ||
samuel@aiko ~/P/s/a/b/core (main)> ruby fiber-creation.rb | ||
3.2.1 | ||
Fiber creation duration: 0.005040982039645314 seconds | ||
Fiber resume duration: 0.010302124079316854 seconds | ||
Fiber creation duration: 0.003798560006543994 seconds | ||
Fiber resume duration: 0.009062751894816756 seconds | ||
Fiber creation duration: 0.0030817579245194793 seconds | ||
Fiber resume duration: 0.008363569970242679 seconds | ||
samuel@aiko ~/P/i/benchmarks> ruby thread-creation.rb | ||
Fiber duration: 0.97us | ||
Fiber duration: 0.99us | ||
Fiber duration: 0.74us | ||
samuel@aiko ~/P/s/a/b/core (main)> ruby thread-creation.rb | ||
3.2.1 | ||
Thread creation duration: 0.1543678540037945 seconds | ||
Thread join duration: 0.1661193009931594 seconds | ||
Thread creation duration: 0.05045510292984545 seconds | ||
Thread join duration: 0.1042662620311603 seconds | ||
Thread creation duration: 0.026006213040091097 seconds | ||
Thread join duration: 0.0831627210136503 seconds | ||
``` | ||
Thread duration: 13.65us | ||
Thread duration: 12.14us | ||
Thread duration: 12.81us | ||
``` |