Closed Bug 466135 Opened 17 years ago Closed 17 years ago

Mixins vs Inheritance for Filters

Categories

(Tamarin Graveyard :: Tracing Virtual Machine, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED WONTFIX

People

(Reporter: gal, Assigned: gal)

Details

Attachments

(1 file)

nanojit is about 10 times slower compiling regular expressions than a hand-woven machine code generator that doesn't do register allocation. I was wondering whether the fact that we use inheritance to model the filters has anything to do with it. Attached is a patch that uses template-based mixins instead of inheritance. In theory a good C++ compiler should flatten this out completely and no dispatch overhead should be incurred. Either it didn't matter in the first place, or g++ just sucks, but I didn't see any noticeable improvement. This only re-works the backwards pipeline.
Attached patch patch against TMSplinter Review
Assignee: nobody → gal
Status: NEW → ASSIGNED
Verdict: a total waste of time. Inheritance is doing just fine, at least with gcc.
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → WONTFIX
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: