Optimization story: Switching from GMP to gcc's __int128 reduced run time by 95%
https://www.nu42.com/2016/01/excellent-optimization-story.html
Is /g/ just reposts from Hacker News with memes shoehorned into them now?
>>52451283
>fixed-length integers are faster than an arbitrary precision library
Wow, what a fucking shocker.
>>52451283
>doing integer operations on 128-bit MMX registers is a lot faster than handling arbitrary precision data types
Oh wow, it's fucking nothing
>>52451324
>>52451335
Kill yourself, OP.
>>52451283
>128 bit is arbitrary precision now
>>52451343
The point of this article is that arbitrary precision is less useful than it used to be because we can now achieve precise enough and faster operations for a lot of applications.
I don't get it, why stop at 128-bits when you can use 256-bit integers for even more precision?
>>52451283
Off yourself faggot.
>>52452335
Okay, but what about if you need more than 128 bits? This is a non-article; it's just stupidity.
> Using arithmetic operators is 99% faster than doing addition through the Mathmatica API
> LOL, synthetic algebra fags on suicide watch XD
>>52453189
> For what might be obvious reasons, I would love for us to be able to find all 42 digit excellent numbers ;-) We need 70 bits for each half of such a number. We can use Steven Fuerst's 256-bit integer multiplication routines coupled with gcc's libquadmath to get there, but sqrtq is quite a bit slower (although, not as slow as using GMP).
Did you even read it?
lolllllllll
wtf did you think would happen, n00b
>>52453189
>needing more than 128-bits
code monkeys should just learn to use their bits more efficiently
>>52451283
>He got the following timings on a MacBook Air
And dropped.
Use something that doesn't thermal throttle if you want to run speed tests.
>>52451283
Does GMP use AVX for number that are small enough?
APNG was a mistake
>>52454634
You only use arbitrary precision in specific situations.
For example I needed to calculate if a vector lies exactly on a line.
Not within 0.0000000000000000000001 of the line, but exact.
So I used exact maths and just accepted the performance hit.
>>52454634
> doing cryptography with 2048bit keys
> "Use bits more efficiently"
Are you fucking stupid?