Maybe add bind_bindFunction3 for Speedometer/react?

NEW
Unassigned

Status

()

enhancement
P5
normal
2 years ago
Last year

People

(Reporter: anba, Unassigned)

Tracking

(Blocks 1 bug)

Trunk
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Reporter

Description

2 years ago
The React version used in Speedometer calls Function.prototype.bind with three bound arguments, which means it currently uses the slower bind_bindFunctionN implementation. Maybe we should add bind_bindFunction3, so we can avoid some extra array allocations when merging the bound and call arguments.
Reporter

Comment 1

2 years ago
Numbers for a single run of React and React-Redux from InteractiveRunner.html (bound functions have a negligible use in the other frameworks).


Create bound functions:

React
  0-bound args: 759
  1-bound args: 100273
  2-bound args: 0
  3-bound args: 100
  4-bound args: 0
> 4-bound args: 0

React-Redux
  0-bound args: 711
  1-bound args: 265
  2-bound args: 0
  3-bound args: 0
  4-bound args: 0
> 4-bound args: 0


Calls to bound functions:

React
  0-bound args: 5969
  1-bound args: 1170
  2-bound args: 0
  3-bound args: 100
  4-bound args: 0
> 4-bound args: 0

React-Redux
  0-bound args: 44237
  1-bound args: 515
  2-bound args: 0
  3-bound args: 0
  4-bound args: 0
> 4-bound args: 0


So there are only 100 calls to create bound functions with three bound arguments.
Priority: -- → P5
You need to log in before you can comment on or make changes to this bug.