Opened 4 months ago

Last modified 7 weeks 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:

Description

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 4 months ago by bgamari

Keywords: newcomer added

comment:2 Changed 7 weeks ago by supersven

Owner: set to supersven

comment:3 Changed 7 weeks ago by osa1

Milestone: 8.8.18.10.1

Bumping milestones of low-priority tickets.

Note: See TracTickets for help on using tickets.