v0.0.19
There are 2 breaking changes.
-
Changed
OperatorDict
arguments format.
Past:OperatorDict(atom_op_function_map, quote_atom, apply_atom, unknown_op_handler)
New:OperatorDict(atom_op_function_map, option)
whereoption
is{quote_atom: Bytes, apply_atom: Bytes, unknown_op_handler: typeof default_unknown_op}
-
When you initialize
Bytes
using constructor likenew Byte(data)
,data
is not copied but just stored and keeps reference ofdata
, for performance enhancement.
In javascript, byte copy byTypedArray
constructor is not sufficiently fast.
So I left user an option how to initializeBytes
instance. Data copy, or Store reference.
If you want to copy data and cut reference apart, then please getBytes
instance byBytes.from
factory function.
Resolved a deep tree performance issue
Before this version, yarn test serialize_test --testNamePattern=test_very_deep_tree
was really slow. It took around 80 seconds to complete test.
At this version, I've managed to improve test complete time to 79s
-> 2s
by pre-allocating buffer memory on Stream
instance.
Changed
- Changed
OperatorDict
arguments format. - When you initialize
Bytes
using constructor likenew Byte(data)
,data
is not copied but just stored and keeps reference ofdata
, for performance enhancement. - Greatly improved overall performance by pre-allocating buffer memory on
Stream
instance. - Improved performance of
Bytes::equal_to
. - Changed parameter type of
SExp::equal_to
fromCastableType
toany
- Replaced use of
instanceof
operator for non-native types. - Updated bls-signatures version to 0.2.1-beta.1
- Improved
Bytes::concat
performance. - Reorganized dist folder
Fixed
- Fixed an issue where
SExp.to(<boolean>)
did not work the same as python's clvm. - Fixed an issue where Bytes-SExp comparison like
b('aaa').equal_to(SExp.null())
did not work. - Fixed an issue where
OperatorDict
did not throw Error when eitherquote
orapply
is not specified.
Added
- Added
list()
function working similar to Python'slist()
. - Added
Bytes::repeat
function.