Hi Gerrit,

I've looked at the MField sync and have a couple of questions (I know
you are still working on parts of this, so some questions might not be
relevant):

- I think AspectOffsetStore should be std::vector<ptrdiff_t> otherwise
I'd (maybe naively) expect problems on 64 bit archs ?

- AspectStore::fillOffsetArray invokes undefined behavior, I think, by
performing pointer arithmetic on pointers that do not point into the
same array (I've tried to read the relevant parts of the standard, but
the language it uses is a bit difficult ;) ). I'm aware this is not
likely to be a problem, but I wonder how long it will take until some
clever compiler uses this to optimize the loop in that function away and
returns a vector full of -1 entries ?

- fillOffsetArray is called quite often it seems, wouldn't it make sense
to pass the AspectStore to the relevant functions instead and cache the
offsets there, for example ?
Or we could cache the offsets of the fields from the start of the
container. This would never change (except for DynamicFieldAttachment)
even if container copies/instances in some aspects a destroyed and
recreated.

        Thanks,
                Carsten

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Opensg-core mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-core

Reply via email to