Small Buffer Optimization for string and friends

Manu turkeyman at gmail.com
Mon Apr 9 02:21:42 PDT 2012


On 9 April 2012 11:24, Don <nospam at nospam.com> wrote:

> On 08.04.2012 07:56, Andrei Alexandrescu wrote:
>
>  For this to happen, we need to start an effort of migrating built-in
>> arrays into runtime, essentially making them templates that the compiler
>> lowers to. So I have two questions:
>>
>
> vote -= real.infinity.
>
> That would kill D.


How do you figure?

After thinking on it a bit, I'm becoming a little worried about this move
for 2 rarely considered reasons:
Using lowering to a template, debug(/unoptimised) performance will probably
get a lot slower, which is really annoying. And debugging/stepping might
become considerably more annoying too, if every time I press F11 (step in)
over a function call that happens to receive an arg from an array, the
debugger then steps into the array templates index operator... We'd be no
better off than with STL, unless the language has clever ways of hiding
this magic from the debugger too, and optimising/inlining the index even in
debug builds...? But this is the built-in array, and not a library we can
optionally not use.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20120409/0106e225/attachment.html>


More information about the Digitalmars-d mailing list