Closed
Bug 1884321
Opened 8 months ago
Closed 7 months ago
webidl.py profiling shows half a second spent looking up the `filename()` method
Categories
(Core :: DOM: Bindings (WebIDL), task)
Core
DOM: Bindings (WebIDL)
Tracking
()
RESOLVED
FIXED
125 Branch
Tracking | Status | |
---|---|---|
firefox125 | --- | fixed |
People
(Reporter: sergesanspaille, Assigned: sergesanspaille)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
In python, method calls are slower than attribute lookup, which can make a difference for repeatedly called methods that are actually attribute getter.
In [1]: class A:
...: def __init__(self):
...: self.var = 1
...:
In [2]: class B:
...: def __init__(self):
...: self._var = 1
...: def var(self):
...: return self._var
...:
In [3]: a = A()
In [4]: b = B()
In [5]: %timeit a.var
10.9 ns ± 0.457 ns per loop (mean ± std. dev. of 7 runs, 100,000,000 loops each)
In [6]: %timeit b.var()
28.7 ns ± 0.134 ns per loop (mean ± std. dev. of 7 runs, 10,000,000 loops each)
Assignee | ||
Comment 1•8 months ago
|
||
Depends on D204007
Pushed by sguelton@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/3bc46d60be63
faster webildl.py: faster filename access r=ahochheiden
Comment 3•7 months ago
|
||
Backed out with Bug 1884319 + Bug 1884320 + Bug 1884325 + Bug 1884327 for causing linting failures.
Assignee | ||
Updated•7 months ago
|
Pushed by sguelton@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d60b35180991
faster webildl.py: faster filename access r=ahochheiden
Comment 5•7 months ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 7 months ago
status-firefox125:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 125 Branch
Updated•7 months ago
|
Component: General → DOM: Bindings (WebIDL)
Product: Firefox Build System → Core
You need to log in
before you can comment on or make changes to this bug.
Description
•