Posts

Showing posts with the label slow

C++ boost::replace_all Slowed Me

I've just had myself into a complete frazzle, code yesterday was fast, rendering 120fps, the same code today was struggling to pass 11fps.  And it had me pulling my hair out, of which I have little left to spare. The problem? I had been processing strings for specific patterns and only replacing them, so a variable in my engine might have the value "SCORE" and it'd replace the players score value directly into the std::string instance for display. I however decided I wanted to compound all these reserved words to allow any value to contain any replaced value and also contain formatting, so I could so something like "You have scored %SCORE% today" and it'd just place the number in place. I turned to boost for this, boost::replace_all, to be specific, and I had about 45 pattern matches which would try to replace any instance of the string in place. However, this function does not look a head if the predicate is present in the source string, it's in fac...

Virgin Media : Poor Internet Speed Misery

Image
You know that moment in Misery where Annie (played by the excellent Kathy Bates) raises the lump hammer to Paul (James Caan's) ankles?  That hopeless moment, where you know what's coming, and she's determined this is the best, and he's helpless to change things.... Yeah, his feeling at that moment is the same feeling I get whenever I try to solve my service problems with Virgin Media.  I've tried in the phone centre, they either won't talk to me, or deny I'm an account holder - the account being in my wifes name, but I'm a registered up user of the account etc etc.... Or they simply deny there's an issue.... "I can ping you now sir".... Really, a few ICMP packets get through and you think it's a-okay do you? Or I get told, reboot your superhub... Or variously asked "are you on wifi or wired"... It makes no difference when the speed recorded by either is less than 2mbits!!! And I've just been told in a reply on twitter ...