-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add AnyValue #113
Add AnyValue #113
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple comments.
8d758cc
to
718bcb0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Eagerly approving to unblock, but please do look at some of the suggested changes (because I'm not sure your benchmarks are testing what their descriptions seem to imply). Additionally, if you could include a copy-pasta of the console output of running the benchmarks in the PR discussion thread, that would be much appreciated. :-)
Thanks!
-Brennan
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Marking as approved for merge. Thanks @dabrahams !
Brennan will resolve the duplication and perform module dependency inversion as necessary.
swift run -c release -Xswiftc -cross-module-optimization Benchmarks --warmup-iterations 2 --filter AnyValue name time std iterations warmup --------------------------------------------------------------------------------------------------- AnyValue.erased [Int] sum 6695608 ns ± 3.24 % 210 15740437 ns AnyValue.erased [Int] swapHalves 1591548 ns ± 6.03 % 858 3213536 ns AnyValue.erased [Int]x2 sum 3812041.500 ns ± 4.37 % 362 7813602 ns AnyValue.erased [Int]x2 swapHalves 5092725.500 ns ± 4.47 % 266 10145487 ns AnyValue.erased [Int]x4 sum 2194474 ns ± 5.67 % 621 4470787 ns AnyValue.erased [Int]x4 swapHalves 4961560 ns ± 4.33 % 277 10111853 ns NaiveAnyBased_AnyValue.erased [Int] sum 68659456.500 ns ± 3.19 % 20 136630376 ns NaiveAnyBased_AnyValue.erased [Int] swapHalves 26975835.500 ns ± 2.23 % 52 55485238 ns NaiveAnyBased_AnyValue.erased [Int]x2 sum 34115200.500 ns ± 7.83 % 42 68211571 ns NaiveAnyBased_AnyValue.erased [Int]x2 swapHalves 61322458 ns ± 1.30 % 22 140975636 ns NaiveAnyBased_AnyValue.erased [Int]x4 sum 4852811.500 ns ± 3.87 % 290 9933364 ns NaiveAnyBased_AnyValue.erased [Int]x4 swapHalves 13151125.500 ns ± 4.09 % 104 27471499 ns ClassBoxBased_AnyValue.erased [Int] sum 13703008 ns ± 7.85 % 101 27719254 ns ClassBoxBased_AnyValue.erased [Int] swapHalves 2559842 ns ± 4.72 % 532 5151679 ns ClassBoxBased_AnyValue.erased [Int]x2 sum 2732989 ns ± 4.55 % 508 5658913 ns ClassBoxBased_AnyValue.erased [Int]x2 swapHalves 5792227 ns ± 3.56 % 242 11931203 ns ClassBoxBased_AnyValue.erased [Int]x4 sum 2489451.500 ns ± 4.67 % 564 5249983 ns ClassBoxBased_AnyValue.erased [Int]x4 swapHalves 4859068 ns ± 4.80 % 285 9724080 ns
OMG this was so hard to get right, you don't even know.
Note: see commit messages for progression of results.