mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-05 00:56:39 +00:00
LibJS: Make use of arm64 FJCVTZS instruction if available
Some checks are pending
CI / Lagom (arm64, Sanitizer_CI, false, macos-15, macOS, Clang) (push) Waiting to run
CI / Lagom (x86_64, Fuzzers_CI, false, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, false, ubuntu-24.04, Linux, GNU) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, true, ubuntu-24.04, Linux, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (arm64, macos-15, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (x86_64, ubuntu-24.04, Linux, Linux-x86_64) (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
Some checks are pending
CI / Lagom (arm64, Sanitizer_CI, false, macos-15, macOS, Clang) (push) Waiting to run
CI / Lagom (x86_64, Fuzzers_CI, false, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, false, ubuntu-24.04, Linux, GNU) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, true, ubuntu-24.04, Linux, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (arm64, macos-15, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (x86_64, ubuntu-24.04, Linux, Linux-x86_64) (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
FJCVTZS (Floating-point Javascript Convert to Signed fixed-point, rounding toward Zero) does exactly what we need for ToInt32 in the JavaScript specification. This isn't world-changing, but it does give a ~2% boost on compute- heavy benchmarks like JetStream, so we should obviously use it.
This commit is contained in:
parent
938b1e91fe
commit
8c8023465b
Notes:
github-actions[bot]
2025-04-09 20:07:43 +00:00
Author: https://github.com/awesomekling
Commit: 8c8023465b
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4301
2 changed files with 9 additions and 0 deletions
|
@ -54,6 +54,11 @@ inline ThrowCompletionOr<i32> Value::to_i32(VM& vm) const
|
|||
if (is_int32())
|
||||
return as_i32();
|
||||
|
||||
#if __has_builtin(__builtin_arm_jcvt)
|
||||
if (is_double())
|
||||
return __builtin_arm_jcvt(m_value.as_double);
|
||||
#endif
|
||||
|
||||
return to_i32_slow_case(vm);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue