-
Notifications
You must be signed in to change notification settings - Fork 126
use kerl package if installed #164
base: develop
Are you sure you want to change the base?
Conversation
|
Hey Scott! This looks awesome!! Out of curiosity, is it too late to call the package ckerl, so that we can have ccurl and ckerl to complement PyCurl and PyKerl? 😸 Since the package is hosted on an external repo, I'll need to get clearance from the IOTA Foundation to include it as an installable extra. I did a quick once-over, and your code looks great; will do some more testing this weekend. |
|
Yeah, I can change the name to |
99286cd to
c1f6d69
Compare
|
Updated. |
|
Rockstar (: Thanks mate! I'll follow up as soon as I get the OK from the IF. |
|
Hey Scott. Sorry for the delay; I am still waiting to get approval to merge this. @alon-e could you have a look at this PR and the linked |
|
No worries. I haven't had much time to dedicate to Iota things recently (and won't for at least the next month or so), so I'm in no rush. However, I do think it would be useful. When I get more time I had started a cython implementation of the pearldiver. I had gotten it to work in the single threaded case and it was much faster than the python implementation that someone else had ported, but I had not yet gotten it working in a multi threaded case (which would probably be necessary to make it worthwhile) |
|
Oops. Didn't mean to close. |
|
@scottbelden if I do |
|
Hey @dwjorgeb we're just waiting for sign off from an IOTA Foundation member. In the meantime, you can install the |
|
I see, but I don't think it will help until it's merged, the library won't use it. @todofixthis
|
|
Ah... right 😁 |
|
@dwjorgeb The |
c1f6d69 to
f31d1d8
Compare
Resolves #161
This adds an optional C extension for the
kerlfunctionality. It can be installed by itself withpip install kerlbut I've updated thesetup.pyso that it can also be installed withpip install pyota[kerl]. Additionally I created a group for both C extensions so that one can dopip install pyota[speedups].When creating the extension I changed the names of
convertToTritsandconvertToBytestobytes_to_tritsandtrits_to_bytes. I thought these names were more descriptive and I don't think this should affect anyone as I don't imagine many (if any) people were importing these names.Finally, the numbers...
I used the following script as my benchmark:
With the python implementation, it takes me 4.759015798568726 seconds. Using the C extension, it takes 0.9080002307891846 seconds (over five times faster).
Just for fun, I also timed how long it takes to run the tests with both versions. Under the python version it takes 112.564s while the C extension takes 72.736s.