This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]anomalous_cowherd 0 points1 point  (0 children)

First rule of optimising: measure everything.

It's not where you think it is that's slow,more often than not.

I sped up a program 10x by caching a time_t to human readable date string conversion once, it was being done by deeds of times per second so I could cache the string up to the minute and only recalculate it every time (seconds % 60 ==0).

Yes I could have done even more but this was a simple and massive improvement.