Opened 12 months ago

#15620 new bug

Speed up Data.Unique

Reported by: dfeuer Owned by:
Priority: normal Milestone: 8.6.1
Component: Core Libraries Version: 8.4.3
Keywords: 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

The current Data.Unique code seems heavier than necessary:

  1. It uses Integer when it can surely get away with less than two words on 64-bit systems.
  1. It effectively guarantees that uniques will be consecutive, which isn't very useful.

I don't know how to fix this, but I'm confident there's a better way out there.

One silly idea: use one 100 or so-bit counter per capability. Use the rest of the bits to distinguish among the capabilities. To reduce hash collisions, make each capability increment its counter by a different prime number (or something like that).

Change History (0)

Note: See TracTickets for help on using tickets.