Execution time mis-accounting
|Reported by:||heatsink||Owned by:|
|Type of failure:||None/Unknown||Test Case:|
|Related Tickets:||Differential Rev(s):|
In the attached test case, profiling assigns a large fraction of run time to a single function. The fraction ranges from 19% to 40% across runs. Although I haven't independently verified the profile, I believe execution time is mis-attributed to this function.
The function in question is:
intersect :: Object -> Ray -> Maybe Intersection intersect obj@(Object dat mem) = objmIntersect mem dat obj
where objmIntersect is a field selector. In -ddump-simpl output, the function consists of two case statements and a function call. The function it calls has its own SCC.
In profiling, this function is usually listed as the most time-consuming function in the program. Its callee is assigned a similar amount of time. Both functions are called the same number of times. The callee computes a ray-triangle intersection, which is presumably more time-consuming than two case statements and a function call...
COST CENTRE MODULE %time %alloc intersect Datatypes 28.5 11.3 triangle.intersect Triangle 25.0 2.0 (other functions...)
I've reduced the test case from a somewhat larger ray tracer. I'm willing to help reduce it further if needed. The test case depends on the vector-space library.
Change History (14)
Changed 7 years ago by heatsink
comment:4 Changed 5 years ago by igloo
- Milestone changed from 6.12.3 to 6.14.1
- Priority changed from normal to low
comment:7 Changed 4 years ago by simonmar
- Milestone changed from 7.2.1 to 7.4.1
- Owner set to simonmar
- Priority changed from low to high
- Type of failure set to None/Unknown
Changed 4 years ago by heatsink
comment:10 Changed 4 years ago by heatsink
- Owner simonmar deleted
- Resolution fixed deleted
- Status changed from closed to new
- Version changed from 6.8.2 to 7.3
comment:11 Changed 4 years ago by simonmar
- Resolution set to fixed
- Status changed from new to closed