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

Making operations generic over CoordFloat #53

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ianthetechie
Copy link

This library is not currently usable unless your geometry uses f64 coordinates.

It's arguable whether most projects should use f32 (IIUC most CPUs will still use 64-bit registers for 32-bit floating point math), but I think there is some value in considering support. If you are working with extremely large datasets in memory and don't need millimeter-level precision, f32 can save a ton of RAM, enabling you to work with even larger datasets. It also might enable better better SIMD optimizations in the future, since you can pack twice as much data in registers.

I'm opening this as a draft PR since there are a few open questions, including whether this is even a welcome change :) This is just a first whack at a working implementation that shows it's possible, but we probably want to do the following before merge:

  • Performance testing to make sure this doesn't regress (shouldn't, but want to make sure). I see there are criterion benchmarks, but it doesn't look like they actually run in CI? Is there a strategy for approaching things like this within the project already?
  • Figure out a better approach to testing than copy+paste. I can think of a macro that generates tests for multiple types... ideas welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant