Re:15-line hash table in C
by Saltor on Friday December 12, 2014 @04:19AM
(#8739181)
why would you a 2 element array of int here instead of defining a struct of 2 ints?
[ Parent
| on HN ]
Re:15-line hash table in C
by ExpiredLink on Friday December 12, 2014 @05:00AM
(#8739298)
A wasteful struct - are you kidding?
I'm not. Is there some performance penalty for using a struct over a 2 element array?
No performance penalty. It would make the code longer.
Consider "<Foo> in <bar> lines" type articles to be performance pieces - the point is to make it short, not readable or user friendly.
Re:15-line hash table in C
by mmaldacker on Friday December 12, 2014 @06:03AM
(#8739447)
In this case, it makes no difference. The array is used instead of a struct to save a few lines of code and making the title of this post more impressive.