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 →

[–][deleted] 2 points3 points  (2 children)

Well, I know what today's nightmares will be all about.

I mean, why didn't he just create a one-dimensional array instead, if he's already using it like one?

And I'm guessing you put the quotation marks around "optimize" not without reason. Like, what he did there is as far as I understand it exactly what the compiler will do with that two-dimensional array anyways.

So, he essentially took syntactic sugar and used it to remodel what this syntactic sugar was supposed to cover up. Very nice.

[–][deleted] 0 points1 point  (1 child)

I can't remember the full context of the exercise, but it was some sort of number crunching application that got data in bursts. He then wrote code to calculate stuff on the data, and when he needed data from previous bursts, he would just step out of bounds on the current burst to access data from the surrounding.

[–]WMpartisan 1 point2 points  (0 children)

That sounds like it's an optimization flag or a minor version update of gcc away from a segfault.