PhantomGamesDevelopment / Galactic-2D

Open source engine technology created in C++.
1 stars 1 forks source link

crc.cpp - Small optimization #28

Closed Ragora closed 9 years ago

Ragora commented 9 years ago

It would appear that you'll get a slight performance buff if you pass crcv1 by reference rather than value in crc.cpp, specifically looking at the assignment here: https://github.com/PhantomGamesDevelopment/Galactic-2D/blob/master/Source/EngineCore/Files/crc.cpp#L37

Further, it is unclear as to why you'd need a crcv1 parameter in in the declaration on line 26 as it seems to be the one you'll actually use to compute the CRC of some arbitrary data.

Ragora commented 9 years ago

That was more or less just me being tired (at 2 AM) and looking at the master branch. Oops.

Phantom139 commented 9 years ago

Yeah, I noticed that a while back, but I decided instead of wasting more time just re-coding that and the file system, that I'd move it all into the platform module.

Good catch, but funny mistake on not noticing the selected branch. :D

Ragora commented 9 years ago

I more or less only get to do stuff at later times because of how schooling and work lines up with how my scoliosis makes me have no energy after it all (even after rest).

Phantom139 commented 9 years ago

Oh trust me, I know that feeling all too well from my years at UIUC, and my upcoming years at NIU, I'm expecting to be no different, if not even more so than before.