Skip to content

v0.0.19

Compare
Choose a tag to compare
@ChiaMineJP ChiaMineJP released this 01 Aug 02:46
· 165 commits to main since this release
632d883

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)
    where option is {quote_atom: Bytes, apply_atom: Bytes, unknown_op_handler: typeof default_unknown_op}

  • When you initialize Bytes using constructor like new Byte(data), data is not copied but just stored and keeps reference of data, for performance enhancement.
    In javascript, byte copy by TypedArray constructor is not sufficiently fast.
    So I left user an option how to initialize Bytes instance. Data copy, or Store reference.
    If you want to copy data and cut reference apart, then please get Bytes instance by Bytes.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 like new Byte(data), data is not copied but just stored and keeps reference of data, 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 from CastableType to any
  • 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 either quote or apply is not specified.

Added

  • Added list() function working similar to Python's list().
  • Added Bytes::repeat function.