Pay as you go is really going to make a difference

H. S. Teoh hsteoh at quickfur.ath.cx
Fri Jan 24 18:24:03 UTC 2020


On Fri, Jan 24, 2020 at 08:06:33AM -0500, Steven Schveighoffer via Digitalmars-d wrote:
> On 1/24/20 4:52 AM, Johan Engelen wrote:
[...]
> > Indeed. Also to figure out why LDC's binary calls 31 more than DMD's
> > binary.
[...]
> Most likely it's the runtime startup. Obviously sbrk quite a bit, but
> any runtime initialization (thread startup, mutex initialization, etc)
> are all going to go in there. Think of what the GC has to do!
[...]

It makes me wonder how much we can make all this startup stuff
pay-as-you-go.  I mean, IIRC, isn't the GC lazily initialized now? I
vaguely remember some PR along that direction. Or was it the pool
allocations?

I suppose thread startup would be hard to elide, unless there was a way
to initialize the thread stuff only on demand. Ditto for mutex inits.
But it might not be worth the effort for such minimal benefits in such a
marginal test case.


T

-- 
Those who've learned LaTeX swear by it. Those who are learning LaTeX swear at it. -- Pete Bleackley


More information about the Digitalmars-d mailing list