Skip to content

unboxed int64 -> int conversion is slow #3888

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

Open
jvanburen opened this issue Apr 17, 2025 · 0 comments
Open

unboxed int64 -> int conversion is slow #3888

jvanburen opened this issue Apr 17, 2025 · 0 comments
Assignees
Labels
cmm Cmm language / helpers changes

Comments

@jvanburen
Copy link
Contributor

external box_int64 : int64# -> int64 = "%box_int64"

let int_of_int64 (i64 : int64#) = Int64.to_int (box_int64 i64)

leads to

(function{test.ml:18,17-63} camlTest__int_of_int64_0_1_code (i64/334: int)
 (+ (<< (>>s (<< i64/334 1) 1) 1) 1))

which is awful - we should be getting rid of that inner sign-extension in lsl_int

@jvanburen jvanburen added the cmm Cmm language / helpers changes label Apr 17, 2025
@jvanburen jvanburen self-assigned this Apr 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cmm Cmm language / helpers changes
Projects
None yet
Development

No branches or pull requests

1 participant