Small Buffer Optimization for string and friends

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Sun Apr 8 07:29:07 PDT 2012


On 4/8/12 1:33 AM, Daniel Murphy wrote:
> - This has been a disaster for AAs

Making them "magic" has been the problem. We must revert that.

> - Is it worth doing for 32 bit?

Probably not.

> - Would generate false pointers

Fair point but we're also moving to precise collection :o).

> - Run-time check on every array access?

Cost is negligible in most cases according to the extensive measurements 
we've done.

> - Why should this be in the language/compiler instead of phobos?

People use built-in immutable(char)[] as strings. We want to benefit 
existing uses.


Andrei



More information about the Digitalmars-d mailing list