Details
Description
The attached patch eliminates the :meta, :set, :vector, and :map ops.
These four operations can be defined more simply in terms of
calls to with-meta, set, vector, and hash-map respectively.
The compiler was optimizing construction of vectors and maps. Now,
those optimizations are implemented as macros. Additionally, sets
are optimized in much the same way.
3 files changed, 52 insertions
, 99 deletions![]()
Also worth mentioning: as macros instead of ops & emit methods, these optimizations can apply to any backend. The macros create ClojureScript forms, rather than manually generating JavaScript.
Attachments
Activity
Brandon Bloom
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Description |
The attached patch eliminates the :meta, :set, :vector, and :map ops.
These four operations can be defined more simply in terms of calls to with-meta, set, vector, and hash-map respectively. The compiler was optimizing construction of vectors and maps. Now, those optimizations are implemented as macros. Additionally, sets are optimized in much the same way. 3 files changed, 52 insertions(+), 99 deletions(-) |
The attached patch eliminates the :meta, :set, :vector, and :map ops.
These four operations can be defined more simply in terms of calls to with-meta, set, vector, and hash-map respectively. The compiler was optimizing construction of vectors and maps. Now, those optimizations are implemented as macros. Additionally, sets are optimized in much the same way. 3 files changed, 52 insertions(+), 99 deletions(-) Also worth mentioning: as macros instead of ops & emit methods, these optimizations can apply to any backend. The macros create ClojureScript forms, rather than manually generating JavaScript. |
David Nolen
made changes -
| Priority | Minor [ 4 ] | Trivial [ 5 ] |