Closed Bug 628369 Opened 15 years ago Closed 7 years ago

ScriptObject::gc() is inefficient

Categories

(Tamarin Graveyard :: Virtual Machine, defect)

defect
Not set
minor

Tracking

(Not tracked)

RESOLVED WONTFIX
Future

People

(Reporter: stejohns, Unassigned)

Details

It is implemented as return vtable->traits->core->GetGC(); But would be more efficient as return MMgc::GC::GetGC(this);
GC::GetGC(GCObject*) has always been looked upon with derision b/c its a theoretical impediment to different allocation schemes (such as a bump pointer nursery). As always perf #'s speak volumes.
Many of our key api objects have a gc() method for getting the gc whatever way is fastest, even if the implementation changes. We're only talking about a handful of accessor methods that would have to change. If bug 619858 lands they all can go away.
(In reply to comment #1) > GC::GetGC(GCObject*) has always been looked upon with derision b/c its a > theoretical impediment to different allocation schemes (such as a bump pointer > nursery). I don't see how it's true that it's an impediment, though it may be true for the current implementation of GC::GetGC in 4K pages. One could imagine larger allocation units if we want to keep the implementation, or the implementation could go via the page table, which would obviously be quite a bit slower.
(In reply to comment #3) > or the implementation > could go via the page table, which would obviously be quite a bit slower. Note that would require implementing something like the scheme in Bug 610982. Currently you need a GC* in order to get your hands on the page table.
My main point is that with the current implementation, it's almost inconceivable that the GetGC(this) approach wouldn't be fewer loads. (But yeah, no substiture for measuring.) If/when GetGC(this) becomes invalid, we change the impl of gc().
Flags: flashplayer-qrb+
Target Milestone: --- → Future
Tamarin isn't maintained anymore. WONTFIX remaining bugs.
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.