Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
johnitsagal
· 15y ago · 0 comments
string.indexOf() is O(n), whereas the object-property-lookup is O(1). I guess indexOf is fast enough anyway given the size of the dictionary.
Comments
[–]
statictype
15y ago
Is this a bug in HN? I guess this was meant to be posted to the dictionary/javascript topic?
[–]
johnitsagal
OP
15y ago
More likely my mistake; yes it was intended for
http://news.ycombinator.com/item?id=2329940
. Why are people upvoting my comment?!
[–]
jeromec
15y ago
Apparently discussing code on Hacker News is never off-topic ;)
[–]
jedsmith
15y ago
I upvoted it because I was looking for the underlying meaning of an elegant comment. Surely it means something, I said...
[–]
jacoblyles
15y ago
It's nice to see some hard tech content every now and then, even if non-sequitir.