Opened 11 months ago

Last modified 9 months ago

#15842 new feature request

Exponentiation needs PrelRules

Reported by: dfeuer Owned by: supersven
Priority: normal Milestone: 8.10.1
Component: Compiler Version: 8.6.1
Keywords: newcomer Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Runtime performance bug Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


When a user writes a ^ lb, where lb is an integer literal, the type of lb defaults to Integer unless it's annotated. If lb is very small, then RULES will expand the whole expression into a few multiplications. If not, the computation will pay the price of Integer arithmetic. If we want, we should be able to improve this with a special compilation rule. When lb :: Integer, and 0 <= lb <= maxBound :: Word, we should be able to replace lb by the equivalent Word. The same problem appears with ^^ and stimes. Perhaps those can be fixed up as well, somehow.

Change History (3)

comment:1 Changed 11 months ago by bgamari

Keywords: newcomer added

comment:2 Changed 9 months ago by supersven

Owner: set to supersven

comment:3 Changed 9 months ago by osa1


Bumping milestones of low-priority tickets.

Note: See TracTickets for help on using tickets.