-
Notifications
You must be signed in to change notification settings - Fork 64
IPC perf improvements by freem #1632
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
base: master
Are you sure you want to change the base?
Conversation
|
|
freem sent me those patches earlier in time, I remember his branch implementing that was written above commits adding some benchmark framework around that code to time it precisely, so I believe the whole is actually measured to be faster, so I don't really mind if some of those optimizations may look to be overkill. The |
|
There are no actual optimizations here. The good commits are cleanups. Others just change stuff that is only called a couple of times per game, and so can't possibly have a material impact on performance (unless through the vagaries of the optimizer producing better code accidentally due to a random change). |
Measurements done by instrumenting the code shows a ~17% performance
improvement on that function.
time calls time/calls
patched 209635243 12242 17124,264
not patched 167909532 8198 20481,768
57ecd28 to
65ab193
Compare
|
Thanks for opening this. I've just rebased this, fixed the build and opened . I've fixed and squashed the std::fill commit and deleted the commit I advised to delete. Here's a review:
Sure
Fine for me, although it only helps in the DLL case. I did kept the commit as well.
The version in the second commit sounds good, I did squash these two commits together and made it compile correctly (it was missing a
This commit is bogus (malloc vs free). In modern CPP 20 one would use make_unique_for_overwrite for this purpose, but we don't use C++20. Most importantly the allocation function is only called once anyway. I did drop this commit altogether as Slipher suggested.
Change seems reasonable, it's a bit longer but it's claimed to be faster so that's okay IMO. I kept the commit.
Sure, if it doesn't break build I'm fine with it. Kept. |
|
Update: opened #1871 |
A set of patches shared by freem that improve IPC performance. I've only added a commit that fixes a compile error with one of these changes.