3 ms·
Basically, going back to Smalltalk's memory model. It also becomes much easier to JIT optimized machine code for such objects.
by stcredzero 13y ago
Basically, going back to Smalltalk's memory model. It also becomes much easier to JIT optimized machine code for such objects.
- piokuc 13y agoOr CLOS. It's a similar problem with keyword arguments passed in hash tables, I think. The space occupied is less of an issue (unless in a deep recursion) but it's slower then constructing a list of pairs, plus order of parameters is lost..
- rguillebert 13y agoPyPy does the same thing as using __slots__ on CPython automatically, no need to use __slots__ to take advantage of the JIT.
- stcredzero 13y agoI didn't say that __slots__ makes JIT possible. However, it does make writing one easier. (Also makes writing a faster one easier.) EDIT: Is it the new modus operandi on HN: If a statement isn't seemingly 100% in support of your pet language, automatically read the statement in the dimmest and narrowest way possible?
- sgrove 13y agoJust think of it as there was some confusion and possible ambiguity, and your clarification has cleared it up for anyone interested in the subject but not yet knowledgeable enough. Someone can skim through and have their mental model corrected slightly now - a very nice thing!