Posts

Showing posts with the label speed

C++ : Copy Constructor versus Ignorance

Image
I've spent a bit of time reviewing someone else's code recently and I've come to an impasse with them, so they have a lot of code which will take some standard container, and the code doesn't just initialise the local copy from the passed in reference... No it'll iterate over the list of elements adding them to the class version. I have picked fault with this, it's not RAII, it looks ugly and if you're threading you can create your class instance and the member is empty or in a partially filled state before the loop within the constructor is finished... I highlight this in red below... My solution?  Just initialise the member from the reference - see the green highlight in the code below. My results from the timing below? These times are "microseconds" so tiny... But with just constructing from the existing reference we always get a lower time, quicker code... Running this test 30,000 times, trying it in different orders and with maps of upto 1000 ...

CPU Speed : That Time I got Conned

As a technologist I've always been interested in the newest kit coming out, and many moons ago this exact demand for kit made me very mad. For you see, the previous year I'd built my first 2 ghz machine, and it was very costly.  Hyper threading was new to the market, at least in the Pentium 4 range.  And as usual I had need for more power from my machines. So I hit the interwebs and found a machine (on ebay I think) which was 2ghz... A nice CPU was mentioned in the specification... But the memory and graphics capability were lacking... I could make the difference up from my spares bin, so I took the dive ordering this machine as a base on which to work. It duely arrived, I plugged it in, and was dismayed to find it clocking only around 1.1 ghz.  Baffled, I check the advert, "Dual core 2 ghz chip" was definiately there, with the sub-note "exact type may vary, select Intel or AMD preference". Back to the machine it is dual core, but it is not 2 ghz, no where n...

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...

Time Expectations in WoW Classic?

Image
With the news today of EA reducing by 75% the time it will take in Star Wars Battlefront 2 to unlock a hero character, can we expect to see modern gamers head into WoW Classic and start complaining? (c)2017 Electonic Arts Lets just recap though, World of Warcraft, vanilla, people played a character to level 60 in about 4 days played, that's about 96 hours played. EA's plight, and collapse into pandering, happened with a played time of around 40, that's less than half... Reducing it by 75% that now makes a hero in SW:BF2 in 10 hours. 10 hours for Vanilla WoW was not enough, and this is where my first concerns with WoW Classic come about, firstly, will Blizzard be forced to pander down to newer gamers whom most certainly want action & reaction, risk and reward.  They certainly don't deal in patience nor RNG. My second concern comes that this is a big issue, and perhaps Blizzard will side step it, by simple nerfing the amount of time to level, or perhaps increasing th...

Virgin Media - Poor Internet Speed Measured

Image
Phase one of my plan is now complete, I have monitored the speed of my internet ALLLL day, from just after I got home in the morning, through until just now. No-other unit or device was being used through from around 4pm until just now - the wife and I went to watch the new Thor film at the cinema - so, how can Virgin Media explain that clear throttling down mid-afternoon... It is awful and far below anything listed on their website, utter and total garbage speed.  Yet we see a general level of 25+ for most of the day You will need to click this chart to see the image close up. My data points were taken with my script - see the previous post - every 10 seconds, it has generally used resolved to the Server in Leeds. The time markers (green) were added by myself, artificially, by eye.  But they give you the gist of the time, and I will also upload the raw CSV somewhere... I am now going to hit twitter. Edit - This is fabulous, I've just gone to the link I was provided to send in...

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 ...

Virgin Media : Poor Internet Speed

Image
I'm continuing to have my issues with Virgin Media, let me explain.  Last month I came to them asking to remove the superfluous junk offering items, as I was simply paying more for items I didn't use, want nor need. They could not help, in fact they flat refused to, so I cancelled 66% of my services off completely, TV, Phone all gone and never ever to return - well done them... The next item was the 200mbit broadband I was paying for, below is a historic speed test I carried out a lot, as you can see I never, ever, got near 200Mbit, but I always got over 50Mbit... Being quite a logical person therefore, and based on this evidence, this proof I had for myself, I downgraded the internet from the Vivid200 to Vivid50, i.e. 50mbit... Yeah, save money, it can do 50 mbit easy, right... Right... RIGHT?..... WRONG. This is tonight's speed test... Last night it was slower than that, I had a download speed of 1.22mbit, and upload of 620K. Yeah, rocking the 1990's internet speed. A...