-
Notifications
You must be signed in to change notification settings - Fork 333
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
Check cost computing overhead #490
Labels
Comments
I had a couple of ideas on how to compensate for the 17% slowdown. I think the preliminary benchmark results are promising: Current master:
My changes:
I'll open a PR later to discuss the changes after I cleaned them up a little. |
@krypt-n looking forward to seeing the kind of changes you tried! I'll wait for your PR before releasing |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The ability to use multiple profiles introduced in #450 changed the way we now access cost values. Instead of a single matrix lookup previously, we now have a ponderation with a vehicle-dependent speed factor happening in
Vehicle::Cost
:vroom/src/structures/vroom/vehicle.h
Lines 67 to 71 in 1e32124
This is a price we have to pay for the sake of a much bigger flexibility in cost evaluation. The downside is that this also means a computing time increase for single-profile instances even with unused vehicle
speed_factor
(see #450 (comment)).I've tried to make this as efficient as possible, in particular by providing the
Vehicle::Cost
implementation in header file to allow the compiler to perform some optimizations in other units. I wonder if there is more to it and if we could improve the structures or the layout to further reduce the increase. I guess this would call for some profiling to get a clearer view of what are the most expensive bits here.The text was updated successfully, but these errors were encountered: