From mboxrd@z Thu Jan 1 00:00:00 1970 To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> In-reply-to: Your message of "Fri, 18 Feb 2011 11:35:18 PST." References: <201102181445.41877.dexen.devries@gmail.com> <201102181753.30125.dexen.devries@gmail.com> <7769a67a9fbc1fae2186ff9315457e0d@ladd.quanstro.net> <20110218191509.552355B77@mail.bitblocks.com> From: Bakul Shah Date: Fri, 18 Feb 2011 12:10:02 -0800 Message-Id: <20110218201002.465A25B44@mail.bitblocks.com> Subject: Re: [9fans] Modern development language for Plan 9, WAS: Re: RESOLVED: recoving important header file rudely Topicbox-Message-UUID: b15bfa8c-ead6-11e9-9d60-3106f5b1d025 On Fri, 18 Feb 2011 11:35:18 PST David Leimbach wrote: > >> C++ inlines a lot because microbenchmarks improve, but inline every > >> modest function in a big program and you make the binary much bigger > >> and blow the i-cache. > > > > That's a compiler fault. Surely modern compilers need to be > > cache aware? ideally a smart compiler treats `inline' as a hint > > at most, just like `register'. > > Well how does template expansion affect all of this? I've heard in conversa= > tions that C++ is pretty register hungry which makes me think lots of inlini= > ng happens behind the scenes. Then again that's an implementation detail, e= > xcept maybe for templates.= Templates encourage inlining. There is at least one template libraries where the bulk of code is implemented in separate .cc files (using void* tricks), used by some embedded products. But IIRC the original STL from sgi was all in .h files and things don't seem to have changed much -- but I avoid them so who knows.