Re: 3D Points (structs vs classes)
From: Lord Crc (lordcrc_at_hotmail.com)
Date: 02/27/04
- Next message: Jerry III: "Re: Thread mysteriously terminates."
- Previous message: Yun Jin: "Re: Performance problem with framework 1.1"
- In reply to: Eric Gunnerson [MS]: "Re: 3D Points (structs vs classes)"
- Messages sorted by: [ date ] [ thread ]
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
- Next message: Jerry III: "Re: Thread mysteriously terminates."
- Previous message: Yun Jin: "Re: Performance problem with framework 1.1"
- In reply to: Eric Gunnerson [MS]: "Re: 3D Points (structs vs classes)"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
Loading