Closed Bug 885984 Opened 11 years ago Closed 11 years ago

Compiler: Replace methods (_resolve, _yield) with functional equivalents

Categories

(L20n :: JS Library, defect, P2)

x86_64
Linux
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: stas, Assigned: stas)

Details

Attachments

(1 file)

I realized that the logic of setting local.__this__ works better than I thought it did: it's set in Identifier, so there's no need to have _resolve and _yield methods of Entity and Attribute set it again. I did some testing and the results are very promising because not calling any additional methods makes getting entities faster.
Assignee: nobody → stas
Priority: -- → P2
Target Milestone: --- → 1.0
Attached patch Patch (deleted) — Splinter Review
Holy electrons, getting just got 4 times faster! Mean times for settings.lol (via make perf), n = 50 (500x) master patch diff % diff ------------------------------------------ get 127 32 -95 -75%
Comment on attachment 766267 [details] [diff] [review] Patch Review of attachment 766267 [details] [diff] [review]: ----------------------------------------------------------------- ::: lib/l20n/compiler.js @@ +791,1 @@ > return macro._call(ctxdata, evaluated_args); I didn't remove Macro::_call because that would make calling macros in tests much harder and I didn't want to duplicate code here and in callExpression to avoid situation when a change is made to callExpression but tests continue to use the old code in _call.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: