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

H. S. Teoh hsteoh at quickfur.ath.cx
Tue Jul 24 14:31:07 PDT 2012


On Tue, Jul 24, 2012 at 10:53:05PM +0200, David wrote:
> Am 24.07.2012 21:46, schrieb David:
> >>Hmm. Could this be a GC-related issue?
> >
> >Actually this could be. They are stored inside a Vertex* array which is
> >allocated which is allocated with `malloc`, maybe the GC scans all of
> >the created vertex structs? Could this be?
> 
>     import core.memory;
>     GC.disable();
> 
> directly when entering main didn't help, so I guess it's not the GC

This is strange. You said that you profiled the program and the extra
time spent is not in user code? Where is it spent then?


T

-- 
Heuristics are bug-ridden by definition. If they didn't have bugs, they'd be algorithms.


More information about the Digitalmars-d-learn mailing list