Skip to content

runtime: software floating point emulation is too slow #10846

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

Closed
minux opened this issue May 14, 2015 · 1 comment
Closed

runtime: software floating point emulation is too slow #10846

minux opened this issue May 14, 2015 · 1 comment
Milestone

Comments

@minux
Copy link
Member

minux commented May 14, 2015

See #10749.

I propose to make the compiler translate various VFP instructions into
direct call to software floating point functions.

There might be even more optimizations available, because the compiler
knows GOARM now, so we can completely change the way GOARM=5
works.

Once we have another architecture (mips) that also needs software
floating point, then this approach makes even more sense as we don't
need to write anther FP instruction decoder in runtime.

@minux minux added this to the Go1.6 milestone May 14, 2015
@rsc
Copy link
Contributor

rsc commented Nov 5, 2015

Software floating point emulation is too slow

Then use hardware. Seriously. Software floating point is slow. That's the way it is. Not worth spending time on. People who want fast floating point use hardware.

Also, I actually quite like the current approach because it has just one encoding instead of two when looking at the binaries. And in theory you could NOP out the calls to sfloat to turn a software float binary into a hardware float binary.

A MIPS FP instruction decoder does not sound like a lot of code. Maybe 100 lines?

@rsc rsc closed this as completed Nov 5, 2015
@golang golang locked and limited conversation to collaborators Nov 4, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants