Closed Bug 707634 Opened 13 years ago Closed 13 years ago

Missing specializations of float4 constructor

Categories

(Tamarin Graveyard :: Baseline JIT (CodegenLIR), defect, P2)

defect

Tracking

(Not tracked)

VERIFIED FIXED
Q2 12 - Cyril

People

(Reporter: lhansen, Assigned: virgilp)

References

Details

The float4 constructor is currently specialized if the arguments are constant values. But when they are not, then we take the slow path: convert everything to atom, call out to the generic constructor. This is much worse than it needs to be, and a performance drain. We should at least handle the case where the arguments are known to be Number (including int and uint) or float. In this case, there should be in-line conversions to float, and an in-line construction of a float4 datum. The same is true for one argument that is not a constant.
It appears that the one-argument case is handled properly for int, float, and Number argument values, which are the ones we care about most.
Assignee: nobody → virgilp
Blocks: 708204
Fixed starting with changeset 7037:f72cddd20bf0
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Is there any way to test this or can this just be verified by code landing and acceptance and other tests passing?
I guess there could be a performance tests too (constructing float4 values in a loop, based on the value of the loop index?)
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.