-
Couldn't load subscription status.
- Fork 100
Update to newer JSC and use Bun's fork #187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Update to newer JSC and use Bun's fork #187
Conversation
…nary, but without vectorization (helped by the -O2 inlining), the interpreter hot path might not stay hot in the CPU caches. if using JSC on Android, users probably have a Very Good Reason(tm), but I'm not sure which they care about more: app download size or performance per watt efficiency.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for the pr! leaving some comments here.
also good to rebase/merge to latest main. there was build error because of ci disk space. that problem may resolved by #188.
| export ANDROID_HOME="$DEFAULT_ANDROID_HOME" | ||
| fi | ||
|
|
||
| DEFAULT_ANDROID_NDK="$ANDROID_HOME/ndk/28.2.13676358" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| DEFAULT_ANDROID_NDK="$ANDROID_HOME/ndk/28.2.13676358" | |
| DEFAULT_ANDROID_NDK="$ANDROID_HOME/ndk/27.1.12297006" |
maybe align the ndk version with react-native
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The clang in NDK 27.1 is known to miscompile the computed gotos, which we run into in newer interpreters: android/ndk#2040
I'd at least suggest bumping to r27d (27.3.13750724). note that this bug may not affect some platform holders who effectively roll their own NDK with an internally-maintained LLVM/clang distro.
that said, in NDK 28, libc++ now includes debug info, which I've found invaluable when debugging in simulator and on-device.
Co-authored-by: Kudo Chien <ckchien@gmail.com>
…warning (to about warnings as errors killing the build unnecessarily), but also disable loop vectorization options until NDK can be bumped. downgrade to c++20 to align with React Native constraints.
The intent is to deduplicate customized JSC verisons floating around in the ecosystem, and get a newer JSC available to BabylonNative (which uses this repo's npm package).
Why Bun? Bun has made seriializing and caching bytecode, rather than text bundles, commonplace and provided a huge boost to node-like development. We know the value of bytecode bundles in React Native very well: ChakraCore bytecode bundles in 2016 shaved 1 second of time off app launches in React Native Windows, and Hermes bytecode bundles have similar measurable uplift to user experience. Upstream JavaScriptCore has these APIs, but doesn't put them as public -- Bun's fork exposes this plumbing and gives another way we can deploy bytecode bundles via another JS runtime whose performance characteristics may be better for a given workload.