Re: Reducing unncessary string copying



* André Gillibert <metaentropy gmail com> schrieb:

> Ok. If you pass around this structure as a value.
> This indirectly increases the size of a data structure such as:
> struct MyClass
> {
>   GCStr some_string;
>   GCStr another_string;
> } ;
> 
> And there are a lot of them...

<snip>

> Copying a pointer (e.g. 8 bytes on 64 bits platform) requires less
> code than copying a pointer and a char (which may occupy 16 bytes for
> alignment purposes).

True. Perhaps we can find an better platform/arch specific solutions
(and only use this approach on those where not better solution
is available). On 64bit, we perhaps could steal the most-upper bit.


cu
-- 
----------------------------------------------------------------------
 Enrico Weigelt, metux IT service -- http://www.metux.de/

 phone:  +49 36207 519931  email: weigelt metux de
 mobile: +49 151 27565287  icq:   210169427         skype: nekrad666
----------------------------------------------------------------------
 Embedded-Linux / Portierung / Opensource-QM / Verteilte Systeme
----------------------------------------------------------------------


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]