You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just realized a different thing, I tried your benchmark with a CPU profiler.
The result is so shocking: 25% of the time is spend to handle the Result types.
I try to remove one question mark from the rasterizer, it turns out a 10% speed up.
--
Local repo:
test sine_640_480 ... bench: 4,188,667 ns/iter (+/- 338,945)
test sine_640_480_2_horizontal_subgraphs_draw_both ... bench: 4,609,418 ns/iter (+/- 407,366)
test sine_640_480_2_horizontal_subgraphs_draw_one ... bench: 2,298,113 ns/iter (+/- 461,527)
test sine_640_480_2_horizontal_subgraphs_fake_blit ... bench: 270,355 ns/iter (+/- 53,794)
0.2.8:
test sine_640_480 ... bench: 7,277,665 ns/iter (+/- 3,636,985)
test sine_640_480_2_horizontal_subgraphs_draw_both ... bench: 8,129,140 ns/iter (+/- 937,515)
test sine_640_480_2_horizontal_subgraphs_draw_one ... bench: 4,303,821 ns/iter (+/- 255,423)
test sine_640_480_2_horizontal_subgraphs_fake_blit ... bench: 288,119 ns/iter (+/- 102,912)
--
Update, I refactored two question mark to is_err it turns out 50% speed up.
The text was updated successfully, but these errors were encountered:
38
changed the title
[BUG] Investigate the performance overheap of result types
[BUG] Investigate the performance overhead of result types
Oct 17, 2019
See discussion under #56 for detials
Just realized a different thing, I tried your benchmark with a CPU profiler.
The result is so shocking: 25% of the time is spend to handle the Result types.
I try to remove one question mark from the rasterizer, it turns out a 10% speed up.
--
Local repo:
0.2.8:
--
Update, I refactored two question mark to
is_err
it turns out 50% speed up.The text was updated successfully, but these errors were encountered: