On Bounds & Bumpers
Rob: I wasn’t aware that even standard array types in C# were bounds checked
Rob:
double[] x = new double[32];
x[3] = 6;
Rob: x[3] now incurs function call + 2 asserts, thusly 2 branches
Rob: where as in C++, it’s an addition and possibly a multiplication if the complier doesn’t optimize it out (which it will in this case)
Seth: so you can’t code it wrong… it’s like bumper bowling
Rob: this is causing a good deal of the slowdown in this thing we’re supposed to be optimizing -_-;;
Seth: Honestly…. nobody goes Bumper Bowling and says “We do it because it’s highly sophisticated.”
Rob: hahaha
Rob: I like that
Seth: Seriously… you do it because it you don’t want to learn Bowling. You just wanna chuck a big heavy thing at some pins without the pain of direct and public failure.
Rob: lol
May 21st, 2010 at 1:09 pm
Ha ha. Awesome.
However, if this is really causing a good deal of the slowdown in something that needs optimizing, this better mean you have no problems. :)
June 28th, 2010 at 11:12 am
This is great!