-
Notifications
You must be signed in to change notification settings - Fork 25
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
[BUG] Literal _rq
performs conversion of string literal in runtime instead of compile time
#288
Comments
Hi @benruijl . The https://gcc.gnu.org/onlinedocs/libquadmath/strtoflt128.html#strtoflt128 In order to have the conversion done at compile time, one would need to re-implement the An alternative is to use the floating-point literal for |
At the moment, I am using this second option. Basically, I have turned all the literals into |
I expect the performance of the quad prec literal
![strtoflt128](https://user-images.githubusercontent.com/280089/138169344-520da0a5-2ec5-44ee-bf80-3005fce44a00.png)
NUM_rq
to have the same performance of doingreal128(NUM.q)
, however it is much slower. Runningperf
on some sample code shows that the conversion from string to __float128 is not happening at compile time as seems to be the case with.q
, but occurs at runtime:When I use
![nostringconv](https://user-images.githubusercontent.com/280089/138168854-6322a162-a6b3-48df-a8df-13ce449e0255.png)
real128(NUM.q)
, there is no function call tostrtofloat
:Changing from
_rq
to.q
made my code about 1.5 times faster.The text was updated successfully, but these errors were encountered: