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
In testing on my local machine, it seems like switching from C++11 to C++20 and using std::string_views over std::string is generally faster. Using std::string_views, we also don't need to iterate by const reference. We can iterate by value. This abuses the fact that we're keeping the JSON data alive.
Also, I'm not sure using std::chrono::high_resolution_clock is necessarily a good idea. It's not guaranteed to be monotonic. It could end up using the system clock which could be affected by network time sync and such.
I'm not really up for doing a PR myself. But I figured I'd mention some of the more low hanging fruit. I'm sure there's more that could be done.
The text was updated successfully, but these errors were encountered:
In testing on my local machine, it seems like switching from C++11 to C++20 and using std::string_views over std::string is generally faster. Using std::string_views, we also don't need to iterate by const reference. We can iterate by value. This abuses the fact that we're keeping the JSON data alive.
Also, I'm not sure using std::chrono::high_resolution_clock is necessarily a good idea. It's not guaranteed to be monotonic. It could end up using the system clock which could be affected by network time sync and such.
I'm not really up for doing a PR myself. But I figured I'd mention some of the more low hanging fruit. I'm sure there's more that could be done.
The text was updated successfully, but these errors were encountered: