« first day (4310 days earlier)      last day (656 days later) » 

3:48 AM
Hi, I've found that my code ran 10x faster when I made members of a core class private instead of public
what is the compiler able to do with private members that it can't do with public?
i just found a 10x improvement over a seemingly trivial change kind of weird
 
 
3 hours later…
7:08 AM
@Rotartsi are you sure that it was changing public to private or did you also move the order around?
Because changing the order around and affecting the memory layout makes a lot more sense to me than visibility doing anything for "optimization"
 
7:51 AM
i changed the public: to private:, changed some code to use public const inline getter functions, and declared a couple of functions friend
 
doesn't sound like it would reasobably have an effect unless you also change the order of data members, but look at the difference of the generated code if you need to know for sure
 
 
2 hours later…
9:58 AM
I have been clawed by my friend's cute, round cat & bled a lot.
This particular cat ...
Cat> Lemme lure you closer with my good looks, then claw you to death!
Me> $%#^$!!
Friend said her cat had shots, so I shouldn't die of rabies.
 

« first day (4310 days earlier)      last day (656 days later) »