swiftwasm / JavaScriptKit

Swift framework to interact with JavaScript through WebAssembly.
https://swiftpackageindex.com/swiftwasm/JavaScriptKit/main/documentation/javascriptkit
MIT License
664 stars 44 forks source link

Optimize object property access for StaticString keys #253

Open kateinoigakukun opened 3 months ago

github-actions[bot] commented 3 months ago

Time Change: -1,039ms (12%) 👏

Total Time: 8,116ms

Test name Duration Change
Serialization/JavaScript function call through Wasm import 19ms -3ms (16%) 👏
Serialization/JavaScript function call through Wasm import with int 14ms -2ms (14%) 👏
Object heap/Increment and decrement RC 1,545ms -1,036ms (67%) 🏆
View Unchanged | Test name | Duration | Change | | :--- | :---: | :---: | | Serialization/JavaScript function call from Swift | 96ms | -3ms (2%) | | Serialization/Swift Int to JavaScript with assignment | 322ms | -3ms (0%) | | Serialization/Swift Int to JavaScript with call | 926ms | +7ms (0%) | | Serialization/JavaScript Number to Swift Int | 293ms | -4ms (1%) | | Serialization/Swift String to JavaScript with assignment | 390ms | +4ms (1%) | | Serialization/Swift String to JavaScript with call | 967ms | -14ms (1%) | | Serialization/JavaScript String to Swift String | 3,531ms | +15ms (0%) |
View Baselines | Test name | Duration | | :--- | :---: | | Serialization/Call JavaScript function directly | 3ms | | Serialization/Assign JavaScript number directly | 2ms | | Serialization/Call with JavaScript number directly | 3ms | | Serialization/Write JavaScript string directly | 2ms | | Serialization/Call with JavaScript string directly | 2ms |