This is an archive of the discontinued LLVM Phabricator instance.

[flang] Readability improvement in binary->decimal conversion
ClosedPublic

Authored by klausler on Sep 30 2020, 12:39 PM.

Details

Summary

Tweak binary->decimal conversions to avoid an integer multiplication
in a hot loop to improve readability and get a minor (~5%) speed-up.
Use native integer division by constants for more readability, too,
since current build compilers seem to optimize it correctly now.
Delete the now needless temporary work-around facility in
Common/unsigned-const-division.h.

Diff Detail

Event Timeline

klausler created this revision.Sep 30 2020, 12:39 PM
Herald added a project: Restricted Project. · View Herald Transcript
klausler requested review of this revision.Sep 30 2020, 12:39 PM
klausler retitled this revision from Readability improvement in binary->decimal conversion to [flang] Readability improvement in binary->decimal conversion.Sep 30 2020, 1:14 PM
schweitz accepted this revision.Oct 1 2020, 2:01 PM
This revision is now accepted and ready to land.Oct 1 2020, 2:01 PM