-
Notifications
You must be signed in to change notification settings - Fork 60
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
WIP: renderer: micro-optimize CPU culling and other things #1125
base: master
Are you sure you want to change the base?
Conversation
042f364
to
3849aa9
Compare
The screenshots were done over #1043 because this branch was first written over it, and the code looks to already be bit faster when #1043 is merged: The current PR is bringing some extra performance boost over it. While the small performance boost of #1043 was not the purpose of that other PR, this one was, and it looks like both are useful for gaining extra CPU performance small steps after small steps. |
db321e9
to
31949f7
Compare
d8a7050
to
20e405a
Compare
I tested this branch rebased over Before: After: So, I'll start to clean-up things and submit the patches for merging in a near future. Edit: the percentage is higher than the ones in records from previous comments because this time I used a lower graphics preset so less time is spent on other parts of the code. |
20e405a
to
6ef067a
Compare
@@ -1061,10 +1036,8 @@ void R_AddPrecachedWorldInteractions( trRefLight_t *light ) | |||
{ | |||
continue; | |||
} | |||
else | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A lot of stuff here, for example this, or changing if (p == nullptr)
to if (!p)
, is just cosmetic changes which don't change the meaning of the code.
6ef067a
to
52bb942
Compare
52bb942
to
f122bc9
Compare
This code is a hot spot, we better avoid computing useless things if we can return early and do bitwise operations instead of relying on the branch prediction being right.
Commits are meant to be squashed, they are just small steps I did one by one for testing I was not breaking anything.
While I'm at it I'm also do minor improvements there and there in
tr_world.cpp
.