float[] → Vertex[] – decreases performance by 1000%

Dmitry Olshansky dmitry.olsh at gmail.com
Wed Jul 25 09:52:10 PDT 2012


On 25-Jul-12 19:32, David wrote:
> Am 25.07.2012 16:23, schrieb Dmitry Olshansky:
>> On 25-Jul-12 17:54, David wrote:
>>> Ok here we go:
>>>
>>> perf.data: http://dav1d.de/perf.data
>>>
>>> and a fancy image (showing the results of perf):
>>> http://dav1d.de/output.png
>>>
>>> I hope anyone knows where the time is spent.
>>>
>>> Most time spent:
>>> +  53,14%  bralad  [unknown]                   [k] 0xc01e5d2b
>>
>> Would be cool to have before/after graph.
>>
>
> I don't know how to make comparisons with perf.data but here is the
> captured data of the "working" version:
>
> http://dav1d.de/output_before.png
> perf.data: http://dav1d.de/perf_before.data


It looks like a syscall/opengl issue. You somehow managed to hit a dark 
corner of GL driver. It's either a fallback to software (partial) or 
some extra translation layer.
I once had a cool table that showed which GL calls  are direct to 
hardware and which are not for various nvidia cards.

Now the trick is to get an idea why. The best idea to debug driver 
related stuff is to test on some other computer (like different version 
of OS, video card etc.).

Can't quite decipher output but I find it strange that it mentions 
_d_invariant. You'd better compiler with -release if you care for speed.


-- 
Dmitry Olshansky


More information about the Digitalmars-d-learn mailing list