Much faster C# version #230
Replies: 5 comments
-
I added this to my comprehensive build. It is indeed much faster than the standard version, but a bit slower than the rawbits version over on PR#6 (6040 vs 6200). Multithreaded is similar (38600 vs 39000). The ref struct is performant, but it makes it more difficult to run things since I can't put an interface on it (so it won't easily fit in with the rest of the version selection logic, and has to have its own functions). Issues found:
|
Beta Was this translation helpful? Give feedback.
-
As to |
Beta Was this translation helpful? Give feedback.
-
Hmm. I thought I had checked the state of both I'll check the class version tonight. If it performs the same as the ref struct, I'll use it instead, since I can slap an interface on it and use my general runner code instead of custom runner code. |
Beta Was this translation helpful? Give feedback.
-
Yeah, I didn't care about other versions. I just copied C# and modified it. The class performs indeed the same, but I had to modify the code. It's a limitation of how this project is written rather than C# itself, so I ignored the "template". |
Beta Was this translation helpful? Give feedback.
-
I put together the class version, and it ended up even faster than the ref struct (probably my fault in the implementation): 820 us per loop vs 840 us per loop. I'll stick with the class version since it makes everything easier. Also used it as the basis for a version that uses mod 6 arithmetic. Got that up to 9850 loops in 5 seconds. :) |
Beta Was this translation helpful? Give feedback.
-
https://pastebin.com/usbUgMjT
Beta Was this translation helpful? Give feedback.
All reactions