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

how to use the library with maximum performance #209

Open
johannesvollmer opened this issue Mar 12, 2023 · 4 comments
Open

how to use the library with maximum performance #209

johannesvollmer opened this issue Mar 12, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@johannesvollmer
Copy link
Owner

johannesvollmer commented Mar 12, 2023

What can be improved or is missing?

the documentation should provide the basic steps necessary to obtain the best performance. for example, setting the target cpu to native in .cargo/config.toml. But also LTO. feature flags in dependencies, like half: use-intrinsics. and which exr variants are faster and whatnot.

@johannesvollmer johannesvollmer added the enhancement New feature or request label Mar 12, 2023
@Shnatsel
Copy link
Contributor

Shnatsel commented Mar 14, 2023

We should also back that up with benchmarks. I doubt LTO is going to be much of a gain. -C codegen-units=1 is also worth a shot. And if -Ctarget-cpu=native does indeed help, we should just identify the functions that get a speedup and multiversion them using the multiversion crate - that way the speedups will be accessible to everyone without the need to use -Ctarget-cpu=native.

@johannesvollmer
Copy link
Owner Author

great ideas :)

@Shnatsel
Copy link
Contributor

The latest version of half crate now uses the f16 conversion intrinsics on stable Rust, so reading to f16 will be a lot faster on half v2.3.1 and later.

@johannesvollmer
Copy link
Owner Author

johannesvollmer commented Jun 27, 2023

awesome, does that mean we can finally continue that pull request from some time ago? :) #191

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

No branches or pull requests

2 participants