Skip to content

Conversation

@henryiii
Copy link
Member

@henryiii henryiii commented Sep 15, 2021

This is a followup to #645, and closes #644. Benchmarks:

Before:

---------------------------------------------------------------------------------------------- benchmark 'Pick': 2 tests ----------------------------------------------------------------------------------------------
Name (time in us)               Min                     Max                    Mean                 StdDev                  Median                    IQR            Outliers         OPS            Rounds  Iterations
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_pick_only             469.6110 (1.0)       10,963.2400 (1.0)          548.6303 (1.0)         335.7542 (1.0)          496.3605 (1.0)          58.5930 (1.0)         7;153  1,822.7210 (1.0)        1054           1
test_pick_and_slice    752,036.0140 (>1000.0)  794,440.9860 (72.46)    768,945.9046 (>1000.0)  15,980.4104 (47.60)    764,982.2400 (>1000.0)  18,759.4093 (320.16)        2;0      1.3005 (0.00)          5           1
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

After:

--------------------------------------------------------------------------------------- benchmark 'Pick': 2 tests ---------------------------------------------------------------------------------------
Name (time in us)              Min                   Max                  Mean              StdDev                Median                IQR            Outliers         OPS            Rounds  Iterations
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_pick_only            428.6290 (1.0)      8,381.7100 (3.94)       465.9007 (1.0)      245.5388 (2.86)       448.8950 (1.0)      17.9607 (1.0)         9;107  2,146.3802 (1.0)        1081           1
test_pick_and_slice     1,167.1580 (2.72)     2,127.0860 (1.0)      1,223.6495 (2.63)      85.7735 (1.0)      1,196.0865 (2.66)     59.2490 (3.30)        78;59    817.2275 (0.38)        738           1
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

This is almost 1,000 times faster if a slice is made (depending on the size, etc).

@github-actions github-actions bot added the needs changelog Might need a changelog entry label Sep 15, 2021
@henryiii henryiii force-pushed the henryiii/fix/slowslice2 branch from 2ae6071 to 6184366 Compare September 15, 2021 15:11
@github-actions github-actions bot removed the needs changelog Might need a changelog entry label Sep 15, 2021
@henryiii henryiii merged commit d82f1d8 into develop Sep 15, 2021
@henryiii henryiii deleted the henryiii/fix/slowslice2 branch September 15, 2021 15:18
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.

Slicing a large histogram is slow

2 participants