Wassup Jose Weblog nonsense at its best!

29Sep/080

Generics vs Objects

I'm gettin' my learn on. This is a super simple concept, but I had fun building a little tester program that puts generics to the test. I developed two identical class. One uses generics and the other objects. It simply loops through a list 10 times and each time creates a list and adds Int16.MaxValues items to a list. The results:

Generic class time taken: 312500 ticks

Object class time taken: 468750 ticks

Update: WassupJose asks rhetorically "Why?" The answer: "Boxing" that's a hardcore interview question. So look up boxing and don't be a tool. Know your trade.

Filed under: Blog Leave a comment
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


No trackbacks yet.