M
MattAhsworth
I'm develpoing a mapping app and want to store the point data that
makes up lines, points and polygons efficiently.
Am I better off using unsafe C# and creating structs to hold the data
on the stack (100K plus points total) or create classes for all the
data and put up with the overhead of boxing/unboxing?
Is there some middle ground - perhaps an array of structs containing
point data to represent a line wrapped in a class? - if I do that
will the data still be on the stack or will putting it in an array or
class make it an object and force it onto the heap.
Performance is a big factor.
makes up lines, points and polygons efficiently.
Am I better off using unsafe C# and creating structs to hold the data
on the stack (100K plus points total) or create classes for all the
data and put up with the overhead of boxing/unboxing?
Is there some middle ground - perhaps an array of structs containing
point data to represent a line wrapped in a class? - if I do that
will the data still be on the stack or will putting it in an array or
class make it an object and force it onto the heap.
Performance is a big factor.