Skip to content

std.math: Faster floor(double) implementation#8506

Merged
dlang-bot merged 1 commit intodlang:masterfrom
ibuclaw:tweakfloor
Jul 13, 2022
Merged

std.math: Faster floor(double) implementation#8506
dlang-bot merged 1 commit intodlang:masterfrom
ibuclaw:tweakfloor

Conversation

@ibuclaw
Copy link
Member

@ibuclaw ibuclaw commented Jul 11, 2022

Use the same algorithm for floor(double) as used by floor(float).

Shrinks the function size by half for gdc and ldc, and a third for dmd.

In all compilers the function is at most 2x faster.

@ibuclaw ibuclaw added the math label Jul 11, 2022
@dlang-bot
Copy link
Contributor

Thanks for your pull request, @ibuclaw!

Bugzilla references

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "master + phobos#8506"

@ibuclaw ibuclaw requested a review from kinke July 12, 2022 08:56
@dlang-bot dlang-bot merged commit d957f13 into dlang:master Jul 13, 2022
@ibuclaw ibuclaw deleted the tweakfloor branch July 13, 2022 00:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants