Message from JavaScript discussions

October 2018

— They payed around 80m for parse.


It's when you lock some common methods in clojure and return factory constructor, which assigns them directly on object, not using .prototype = common

— Consumes more memory, but property access is faster

— Right

— So the classical way doesn't really exist in JS?

— Exists, as sugar🤤


— Also, ive read some Papa Crockford article, where he says that you may not even use new keyword, but.. the v8 articles about monomorphic vs polymorphic object say you must use new to reach super-speed. that video, ive dropped, says that JS code may run only 17% slower than C/C++ code if it's monomorphic

Message permanent page

— Going to test it and compare the result vs. greensock-js, will see

— The speed is from object structure cache

— V8 tries to cache that information, and if it changes (such as while you add props in a factory) there is additional overhead needed for a lookup as cache misses occur

Message permanent page

— It gets worse if you change the structure of the hot prototype