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

Dmitry Olshansky dmitry.olsh at gmail.com
Thu Jul 26 09:02:01 PDT 2012


On 26-Jul-12 14:14, David wrote:
> Ok, interesting thing.
>
> I switched my buffer from Vertex* to void* and I cast every Vertex I get
> to void[] and add it to the buffer (slice → memcopy) and everything
> works fine now. I can live with that (once the basic functions are
> implemented it's not even a pain to use), but still, I wonder where the
> problem is.
>

Hm. Do you ever do pointer arithmetic on Vertex*?  Is the size and 
offsets are correct (like in Vertex vs float)?

-- 
Dmitry Olshansky


More information about the Digitalmars-d-learn mailing list