Re: 3D Points (structs vs classes)

From: Lord Crc (lordcrc_at_hotmail.com)
Date: 02/27/04


Date: Fri, 27 Feb 2004 20:17:14 +0100

On Thu, 26 Feb 2004 16:59:06 -0800, "Eric Gunnerson [MS]"
<ericgu@online.microsoft.com> wrote:

>The tradeoff is going to be different depending on how you use your type, so
>it's something you need to measure. My guess is that a 3D point will be
>faster as a struct, especially if you have a ton of them.

I managed to reduce my GC time from 60-80% down to 12-15% primarily by
switching from a class based vector to a struct based vector (the
class/struct contains 4 double's).

Just my experience.

- Asbjørn



Relevant Pages

  • Re: [PATCH 2/2] Futex non-page-pinning fix
    ... of struct page * for the anonymous not yet assigned to swap. ... are the places for switching the anonymous, ... the switch from hashing by struct page * to hashing by ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)
  • Re: use customized data type in IDispatch.Invoke
    ... struct is almost the same as class besides ... default access privilege, and any user defined types could is class/struct ... VARIANT or not be able to wrap as a struct? ...
    (microsoft.public.vc.language)

Loading