Skip to content
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

[Question] Performance f32 vs f64 #39

Open
Claus1 opened this issue Apr 2, 2022 · 2 comments
Open

[Question] Performance f32 vs f64 #39

Claus1 opened this issue Apr 2, 2022 · 2 comments
Labels

Comments

@Claus1
Copy link

Claus1 commented Apr 2, 2022

How different is the library performance vs go standard math in average?

@soypat
Copy link
Collaborator

soypat commented Apr 4, 2022

I have not tested it but I imagine on 64bit systems this library would perform as similar or worse than math package.

My understanding is that this library does not seek to beat math speed, which is already optimized with assembly all over the place. math32 is a option for when you need to work with float32's i.e:

  • Working with an external interface that accepts float32, such as graphics libraries (OpenGL, WebGL)
  • Working on <=32bit systems with no FPU such as microcontrollers (see TinyGo)

@soypat
Copy link
Collaborator

soypat commented Jul 17, 2022

I wasn't aware of it before but working with float32 slices can speed up programs in certain cases since more data fits on a cache line.

@soypat soypat added the question label May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants