Opened 23 months ago

Last modified 12 months ago

#11382 new bug

Optimize Data.Char

Reported by: bgamari Owned by:
Priority: normal Milestone: 8.4.1
Component: Core Libraries Version: 7.10.3
Keywords: Cc: ekmett, dfeuer
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Runtime performance bug Test Case:
Blocked By: Blocking:
Related Tickets: #9638 Differential Rev(s):
Wiki Page:


Many of the predicates in Data.Char do full Unicode category lookups which turns out to be quite expensive. Ideally we would handle some of the more common ASCII characters with cheaper tests before falling back to the full Unicode treatment.

Change History (4)

comment:1 Changed 23 months ago by ekmett

Didn't David Feuer try some things along this line?

I seem to recall the branching overhead to split off the ASCII cases was hard to overcome in practice.

comment:2 Changed 23 months ago by thomie

Cc: dfeuer added

comment:3 Changed 23 months ago by bgamari

Thanks for the reference, thomie. It looks like David has done some good work in this area already.

This is an area where improvements in branchless boolean operations (#9661) may help.

comment:4 Changed 12 months ago by bgamari


This won't happen for 8.2; bumping to 8.4.

Note: See TracTickets for help on using tickets.