-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
ARC/ORC loop string allocation slowdown #15392
Comments
Please provide the version that imports |
It's the same as above except add resultHash = crypto_generichash(crypto_generichash($nonceThread, 32, initialHashHex).bin2hex, 32, initialHashHex).bin2hex with resultHash = $secureHash($nonceThread & initialHashHex) |
On my machine the runtimes are 6 minutes for ARC, 4 minutes for the default GC. For unknown reasons. |
Isn't it an unknown ARC reason? Why remove the ARC label? |
Just an update saying the ARC/ORC bug is still present in Nim 1.6.2. |
It seems to be related to threads + orc. Related: #18146 |
fixed on the devel |
My proof of work function encounters a bug when running it under arc/orc. I'm using a libsodium wrapper but if you replace
crypto_generichash()
with SHA1 in the standard library or a SHA2 library (or any other hashing library I think) the bug is also triggered. It runs fine for the default refc gc but when I enable arc or orc I only get ~50% cpu usage instead of 100% with refc. Something weird must be happening under the hood since while htop reports ~90% cpu usage, only ~50% of the load bars are green while the other half is red. This means ~50% of cpu time is used for user processes and ~50% is used for kernel processes. The refc version uses 100% cpu (all green user time) and takes 2.1 seconds to complete while arc/orc takes 17.5 seconds on my Haswell cpu.Example
Edit: removed unnecessary code and added SHA1 version in comments.
Current Output
Used
time <program>
Expected Output
Used
time <program>
Possible Solution
I posted this on the forum and mratsim chimed in saying:
While that might be the case, it still happens when using a hash algorithm implemented in nim.
Additional Information
The bug exists in the latest devel and 1.2.6.
The text was updated successfully, but these errors were encountered: