Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Link-bait title…

Author directly contradicts the title in the tl;dr at the end.



The way wtn said it might be a bit provocative, but here's the last paragraph of the post:

""" I don’t think you should refactor all your code to be sure you have strings of length 23 or less. That would obviously be ridiculous. The 50% speed increase sounds impressive, but actually the time differences I measured were insignificant until I allocated 100,000s or millions of strings – how many Ruby applications will need to create this many string values? And even if you do need to create many string objects, the pain and confusion caused by using only short strings would overwhelm any performance benefit you might get. """

So, basically, "Never create Ruby strings longer than 23 characters" is not true at all. In some specific cases, it might be true. A more accurate title might have been "Why ruby strings with more than 23 characters are handled differently." (Or something similar)

But then, it was an interesting post and I enjoyed it; so it doesn't really matter I guess.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: