nodejs / postject

Easily inject arbitrary read-only resources into executable formats (Mach-O, PE, ELF) and use it at runtime.
Other
187 stars 14 forks source link

feat: make postject faster #86

Closed RaisinTen closed 1 year ago

RaisinTen commented 1 year ago

This change replaces the vecFromJSArray() call in vec_from_val() with a call to convertJSArrayToNumberVector(), which reduces the time consumption of Postject from ~30s to ~6s on a Mach-O Node.js binary when run on my x86_64 macOS.

Fixes: https://github.com/nodejs/postject/issues/85 Refs: https://github.com/emscripten-core/emscripten/pull/11119 CI: https://app.circleci.com/pipelines/github/RaisinTen/postject/8/workflows/6ac6bd04-5249-4c36-8daa-f86e8a52d7db