With this release we are introducing support for runtime metering (i.e. deterministic execution). This is only available via the C API.
Additionally we have made a lot of improvements to both the C and Rust APIs.
Fizzy passes all the official WebAssembly 1.0 tests. We are maintaining the WebAssembly 1.0 test suite with corrections and additions backported from the WebAssembly specification master branch. For this Fizzy release the snapshot from 2022-06-23 is used:
- 19062 of 19062 binary parser and execution tests,
- 1049 of 1049 validation tests,
- 499 skipped due to testing text format parser.
Comparing with the previous release, the performance of instantiation remains unchanged (within 1% performance regression). However, we were able to increase execution performance by around 7%.
Detailed benchmark results
Comparing Fizzy 0.7.0 to 0.8.0 (Intel Haswell CPU 4.4 GHz, Clang 14)
Benchmark CPU Time [µs] Old New
----------------------------------------------------------------------------
fizzy/parse/blake2b +0.0142 23 23
fizzy/parse/ecpairing +0.0082 1313 1324
fizzy/parse/keccak256 +0.0075 42 42
fizzy/parse/memset -0.0004 6 6
fizzy/parse/mul256_opt0 -0.0056 7 7
fizzy/parse/ramanujan_pi +0.0023 24 24
fizzy/parse/sha1 +0.0065 38 38
fizzy/parse/sha256 +0.0052 63 63
fizzy/parse/taylor_pi -0.0070 2 2
GEOMETRIC MEAN +0.0034
fizzy/instantiate/blake2b +0.0141 26 26
fizzy/instantiate/ecpairing +0.0156 1363 1385
fizzy/instantiate/keccak256 +0.0105 46 46
fizzy/instantiate/memset +0.0049 9 9
fizzy/instantiate/mul256_opt0 +0.0084 11 11
fizzy/instantiate/ramanujan_pi +0.0082 27 27
fizzy/instantiate/sha1 +0.0031 42 42
fizzy/instantiate/sha256 +0.0079 66 67
fizzy/instantiate/taylor_pi +0.0075 6 6
GEOMETRIC MEAN +0.0089
fizzy/execute/blake2b/512_bytes_rounds_1 -0.0976 76 68
fizzy/execute/blake2b/512_bytes_rounds_16 -0.1006 1149 1033
fizzy/execute/ecpairing/onepoint -0.0600 366609 344611
fizzy/execute/keccak256/512_bytes_rounds_1 -0.0594 89 84
fizzy/execute/keccak256/512_bytes_rounds_16 -0.0477 1291 1230
fizzy/execute/memset/256_bytes -0.0972 6 6
fizzy/execute/memset/60000_bytes -0.0944 1395 1263
fizzy/execute/mul256_opt0/input1 -0.1092 25 23
fizzy/execute/ramanujan_pi/33_runs -0.1095 103 92
fizzy/execute/sha1/512_bytes_rounds_1 -0.1069 84 75
fizzy/execute/sha1/512_bytes_rounds_16 -0.1071 1174 1048
fizzy/execute/sha256/512_bytes_rounds_1 -0.0275 77 75
fizzy/execute/sha256/512_bytes_rounds_16 -0.0375 1062 1023
fizzy/execute/taylor_pi/pi_1000000_runs +0.0016 37519 37581
GEOMETRIC MEAN -0.0759
Comparing Fizzy 0.7.0 to 0.8.0 (Intel Haswell CPU 4.4 GHz, GCC 12)
Benchmark CPU Time [µs] Old New
----------------------------------------------------------------------------
fizzy/parse/blake2b +0.0046 22 22
fizzy/parse/ecpairing +0.0059 1296 1304
fizzy/parse/keccak256 +0.0091 41 42
fizzy/parse/memset +0.0036 5 5
fizzy/parse/mul256_opt0 +0.0041 7 7
fizzy/parse/ramanujan_pi -0.0008 23 23
fizzy/parse/sha1 +0.0006 37 37
fizzy/parse/sha256 +0.0090 61 62
fizzy/parse/taylor_pi -0.0106 2 2
GEOMETRIC MEAN +0.0028
fizzy/instantiate/blake2b +0.0068 26 26
fizzy/instantiate/ecpairing +0.0063 1348 1357
fizzy/instantiate/keccak256 +0.0019 45 45
fizzy/instantiate/memset +0.0053 9 9
fizzy/instantiate/mul256_opt0 -0.0019 11 11
fizzy/instantiate/ramanujan_pi -0.0010 27 27
fizzy/instantiate/sha1 +0.0085 41 41
fizzy/instantiate/sha256 +0.0019 65 66
fizzy/instantiate/taylor_pi -0.0019 6 6
GEOMETRIC MEAN +0.0029
fizzy/execute/blake2b/512_bytes_rounds_1 -0.0474 71 68
fizzy/execute/blake2b/512_bytes_rounds_16 -0.0463 1076 1026
fizzy/execute/ecpairing/onepoint -0.0192 338070 331572
fizzy/execute/keccak256/512_bytes_rounds_1 -0.1336 76 66
fizzy/execute/keccak256/512_bytes_rounds_16 -0.1376 1116 962
fizzy/execute/memset/256_bytes -0.0681 6 6
fizzy/execute/memset/60000_bytes -0.0720 1371 1272
fizzy/execute/mul256_opt0/input1 +0.0030 24 24
fizzy/execute/ramanujan_pi/33_runs -0.1126 102 91
fizzy/execute/sha1/512_bytes_rounds_1 -0.0990 79 71
fizzy/execute/sha1/512_bytes_rounds_16 -0.1016 1106 994
fizzy/execute/sha256/512_bytes_rounds_1 -0.0810 78 72
fizzy/execute/sha256/512_bytes_rounds_16 -0.0803 1074 988
fizzy/execute/taylor_pi/pi_1000000_runs +0.0003 38233 38244
GEOMETRIC MEAN -0.0721
Added
- Runtime metering support. #626
- Doxygen documentation. #692
- Unit tests for WASI implementation. #713 #790 #792 #796
- Support building on 32-bit platforms. #745
- Floating point support on 32-bit platforms requires to use SSE2 instructions. #785
- Check that limits of imported table/memory do not have min above max. #762
- Minor documentation improvements. #763
- Unit tests for out of memory errors. #773
- README clarifications. #823 #835
- Public C API:
- Rust bindings:
Changed
- Use C++20 bit-manipulating functions instead of intrinsics if available. #542 #689
- Minor floating point instruction optimization. #592
- Hard memory limit is capped at 4 GB. #748
- C++ API:
- Public C API:
- Rust API: minor stylistic improvements. #815
- Floating point instruction tests fixes and improvements. #786 #793 #795
- Other unit test improvements. #787 #830
- CMake files optimizations and refactorings. #770 #837
- CI fixes and improvements. #774 #810 #814 #818 #827 #829 #831 #832 #834 #839
- Dependency upgrades. #798 #802 #804
- Updated WebAssembly spec test suite. #836
Fixed
- Incorrect types in parser leading to build issues on 32-bit architectures. #744
- Validating that imported memory is multiple of page size. #749
- UTF-8 validation on 32-bit architectures and dead store warning in implementation. #752
- Memory allocation and
memory.grow
integer overflow fixes. #747 #808 #809 - Exported memory min limit must be equal to current memory size. #755
- CMake error when including Fizzy into a project as a subdirectory. #758
- Potential Undefined Behaviour in interpreter loop. #813