You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working on a new rule for OptimizeForJS that optimizes the division / modulo by constant for 64-bit types. Since for this particular case it is too expensive to call and execute a helper (polyfill) function for full division. According to my simple tests this gives up to 7x performance gain if the high part of dividend is not zero. The PR will come out pretty huge, so I'm wondering if it's worth it.
Rule will rewrite this i64(x) / C to something like this in simplified form mulh64(x, mag.M) >> mag.S
The text was updated successfully, but these errors were encountered:
So I expect it will be 1000-1200 LOCs including lit tests.
MaxGraey
changed the title
Magic division by constant for OptimizeForJS. Doe it makes sense?
Magic division by constant for OptimizeForJS. Does it make sense?
Aug 5, 2021
Uh oh!
There was an error while loading. Please reload this page.
I'm working on a new rule for OptimizeForJS that optimizes the division / modulo by constant for 64-bit types. Since for this particular case it is too expensive to call and execute a helper (polyfill) function for full division. According to my simple tests this gives up to 7x performance gain if the high part of dividend is not zero. The PR will come out pretty huge, so I'm wondering if it's worth it.
Rule will rewrite this
i64(x) / C
to something like this in simplified formmulh64(x, mag.M) >> mag.S
The text was updated successfully, but these errors were encountered: