I've worked on a JavaScript engine and I'll admit that. The language actively fights optimization. Some of this is due to legacy features, some to inconvenient design decisions like mutable prototype chains. I have tremendous respect for everyone involved in getting JS performance to where it is today.