vE5li / korangar

A next-gen Ragnarok Online client
MIT License
147 stars 33 forks source link

Improve the profiler. #87

Closed hasenbanck closed 2 months ago

hasenbanck commented 2 months ago

Benchmark:

start_frame() with drop:

old = 112.10 ns
new = 60.176 ns

start_measurement() with drop:

old = 93.523 ns
new = 96.892 ns

start_frame() is a lot faster, start_measurement() is a little bit slower, but overall the consistent performance should improve, since once all frame slots are filled, we won't hit the allocator anymore. Packets still hit the allocator, because the boxed trait object can't be re-used.

vE5li commented 2 months ago

Very nice PR! Super exited to have this on main :)