-
-
Notifications
You must be signed in to change notification settings - Fork 419
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
Add addc, subc and mulc functions to I128 and U128 #2645
Conversation
On my linux machine with llvm 5 i do get a missing symbol can anyone reproduce? |
src/libponyrt/ds/hash.h
Outdated
@@ -26,7 +26,7 @@ PONY_EXTERN_C_BEGIN | |||
|
|||
/** Definition of a hash map entry for uintptr_t. | |||
*/ | |||
typedef struct hashmap_entry_t |
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.
I think this was a stray erroneous change from a misrouted keyboard press into my editor. It should probably be removed.
Seems like we also want to add these methods to the |
Yes, I see the same, but only on Is it possible that |
It seems there is a bug for that: https://bugs.llvm.org/show_bug.cgi?id=16404 @jemc why not putting the functions into the Integer trait? |
If it works in the type system, that sounds fine to me. |
I put the functions into the |
I did a small microbenchmark on my computer using ponybench against a I64 version of my The code is in this gist: https://gist.github.com/52c8fb37b5595c1343e09045ab02761e (it actually doesn't run in the playground as it needs pony master for the new improved ponybench). Here are some results:
|
I would love to merge this, but i am hesitating without having anyone else take a look into it. Maybe @jemc or @Praetonus ? |
* WIP * Add addc, subc and mulc functions to I128 and U128 * port __muloti4 to pony and use it in I128.mulc * add addc, subc and mulc method to the Integer trait
These methods are pretty slow on non
native128
machines as we need to manually check for overflow.fixes #2409