Lea Verou 25.02.2009

"Appearances can be deceiving Mr. Anderson" - a.k.a. short code is not always fast code

Przeczytaj oryginał

This article analyzes four JavaScript methods for checking String and Number types, comparing performance through benchmarks. It reveals that while some concise methods appear elegant, they can be significantly slower than alternatives like Object.prototype.toString or typeof. The author concludes that performance testing is crucial and recommends the most reliable method for bulletproof type checking.

"Appearances can be deceiving Mr. Anderson" - a.k.a. short code is not always fast code

komentarzy

Brak komentarzy

Bądź pierwszy, który podzieli się swoimi myślami!

Rozszerzenie przeglądarki

Uzyskaj natychmiastowy dostęp do AllDevBlogs z przeglądarki

Tydzień

No top articles yet