Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


#Actualfrob

Posted 18 February 2014 - 04:41 PM

Oh, that brings a tear to my eye.

 

With all the time I spent on optimizing, that is usually the first kind of code to get eliminated. Even a small container, perhaps with 20 items, could suffer a penalty of several nanoseconds in accumulated overhead. If you had thousands or tens of thousands of items, the result could approach microseconds in overhead.

 

 

Hodgman is absolutely right about that. Congratulations on writing reusable code. Now someone like me will probably need to replace it with a (usually much simpler) piece of specialized code. The Lambda function version is pretty good assuming it gets inlined, but if it doesn't, well, it will probably look like a traditional simple for loop with simple member access. Exactly like the kind of thing that was trying to be avoided in the first place.


#1frob

Posted 18 February 2014 - 04:36 PM

Oh, that brings a tear to my eye.

 

With all the time I spent on optimizing, that is usually the first kind of code to get eliminated. Even a small container, perhaps with 20 items, could suffer a penalty of several microseconds in accumulated overhead.

 

 

Hodgman is absolutely right about that. Congratulations on writing reusable code. Now someone like me must come through later and replace it with a (usually much simpler) piece of specialized code.


PARTNERS