-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Suggestion - Fast floats #1013
Comments
Yes, that would be reasonable. That said:
|
I decided to see what compilers do with the following code float addTen(float num) {
return 10 + num;
} for 64bit targets (compiled with -O3) gcc seems to use SSE adding instructions (specifically addss) while for 32bit targets (compiled with -m32 and -O3) gcc seems to just use x87 instructions like fadd. On the contrary, clang uses addss for both 32 and 64bit targets not sure if this information is helpful but I hope it provides some insight |
Can you try to add |
yeah uses sse for floating point addition for me now. also compiling clang with -march=i686 yields normal x87 instructions. I believe most 32bit distros target i686 so it should mean sse shouldn't be present in distro packages since i686/pentiumpro didn't have sse either way |
|
In ArchLinux32 only i486 doesn't use SSE: https://archlinux32.org/architecture/. |
Currently floating point numbers are handled by Berkeley Soft floats, as stated in the readme these are precise but slow.
Could there be an optional setting in libv86 for faster floats using 64bit js or wasm floats in place of 80 bit x87 floats (with the main downside being precision)? A hack like what box86 does for floats may help performance.
The text was updated successfully, but these errors were encountered: