Skip to content
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

mixed-width integer operations #114

Merged
merged 12 commits into from
Apr 6, 2024
Merged

mixed-width integer operations #114

merged 12 commits into from
Apr 6, 2024

Conversation

enricozb
Copy link
Contributor

@enricozb enricozb commented Apr 4, 2024

Fixes #109

Adds support for mixed-width integer operations.

  • Operators can now be prefixed with one of u8, u16, u32, u60, i8, i16, i32. Omitting a prefix defaults to u60.
  • Numbers are stored as i64, so when displayed they include the sign.
  • Number literals can be prefixed with -.

@enricozb enricozb requested a review from tjjfvi April 4, 2024 10:34
@HigherOrderBot

This comment has been minimized.

@HigherOrderBot

This comment has been minimized.

src/run/port.rs Outdated Show resolved Hide resolved
src/run/interact.rs Show resolved Hide resolved
src/ops.rs Outdated Show resolved Hide resolved
src/run/interact.rs Show resolved Hide resolved
tests/numeric.rs Outdated Show resolved Hide resolved
@HigherOrderBot

This comment has been minimized.

@HigherOrderBot

This comment has been minimized.

@enricozb enricozb changed the title variable-width integer operations mixed-width integer operations Apr 5, 2024
@enricozb enricozb requested a review from tjjfvi April 5, 2024 19:10
@enricozb enricozb marked this pull request as ready for review April 5, 2024 19:10
@HigherOrderBot

This comment has been minimized.

tests/numeric.rs Outdated Show resolved Hide resolved
@HigherOrderBot
Copy link
Collaborator

Perf run for a21cefb:

file              mode        main          a21cefb17bfd
========================================================
merge_sort        intr-singl       7.133 s       6.981 s
                  intr-multi       3.679 s       3.595 s
--------------------------------------------------------
boom              intr-singl       2.230 s       2.252 s
                  intr-multi       2.898 s       2.248 s
--------------------------------------------------------
bitonic_sort_lam  intr-singl      11.521 s      10.836 s
                  intr-multi       5.597 s       5.391 s
--------------------------------------------------------
radix_sort_lam    intr-singl      10.087 s       9.391 s
                  intr-multi       4.814 s       4.734 s
--------------------------------------------------------
sum_tree          intr-singl       9.318 s       9.133 s
                  intr-multi       4.365 s       4.425 s
--------------------------------------------------------
c2                intr-singl       0.000 s       0.000 s
                  intr-multi       0.001 s       0.001 s
--------------------------------------------------------
sum_tail          intr-singl       1.130 s       1.117 s
                  intr-multi       1.277 s       1.112 s
--------------------------------------------------------
sum_rec           intr-singl      14.492 s      13.384 s
                  intr-multi       7.338 s       7.020 s

@enricozb enricozb requested a review from tjjfvi April 6, 2024 11:47
@enricozb enricozb added this pull request to the merge queue Apr 6, 2024
Merged via the queue into main with commit 87040fe Apr 6, 2024
5 checks passed
@enricozb enricozb deleted the enricozb/nums branch April 6, 2024 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add support for more numeric operations
3 participants