Closed Bug 601716 Opened 15 years ago Closed 7 years ago

Should we add Vector<Boolean> specialization?

Categories

(Tamarin Graveyard :: Virtual Machine, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: stejohns, Unassigned)

References

Details

(Whiteboard: PACMAN)

Attachments

(1 file)

Currently we implement Vector<Boolean> as Vector<*>, which uses 32 bits per entry. A simple specialization could have 1 byte per entry trivially (1 bit per entry with a bit more work). Not sure if this is used often enough to be worth specializing though.
Whiteboard: PACMAN
Flags: flashplayer-qrb+
Of 16k SWFs, 71 instances of Vector.<Boolean>
On 64-bit systems we would use 64 bits per entry for Vector.<Boolean> I think (Atom representation, ie, uintptr_t). And it's not just the size; atom writes go through the slowest write path (atomWriteBarrier). Even after optimizations (see eg 601817 and earlier) that's about 10 times slower than writing to Vector.<int>. A quick fix which could be a significant improvement might be to specialize for Vector.<Boolean> but to map it onto the Vector.<int> representation. Not high priority given the scant use of Vector.<Boolean> probably.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: