nitro icon indicating copy to clipboard operation
nitro copied to clipboard

feat: Use `Object::create(...)` for faster Object creation

Open mrousavy opened this issue 3 months ago • 1 comments

Instead of looking up the Object constructor through global, then getting it's static .create(..) function, we can now directly use jsi::Object::create(...) from the native side which should be more efficient - at least in Hermes we have a custom implementation that doesn't look like it's going through global: hermes.cpp:L2048-L2059: HermesRuntimeImpl::createObjectWithPrototype

[!WARNING] jsi::Object::create was added in https://github.com/facebook/react-native/pull/47946, which was first released in react-native v0.78.0. So technically this breaks on react-native 0.75, 0.76, and 0.77, which Nitro still claims to support.

mrousavy avatar Sep 09 '25 12:09 mrousavy

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
nitro-docs Skipped Skipped Sep 26, 2025 11:47am

vercel[bot] avatar Sep 09 '25 12:09 vercel[bot]