inlining or not inlining...
Jim
bitcirkel at yahoo.com
Sat Feb 12 06:09:56 PST 2011
ivan Wrote:
> Jim Wrote:
>
> > spir Wrote:
> >
> > > On 02/12/2011 12:15 PM, Jim wrote:
> > > > Sorry about that, but I think that is a closely related discussion. @inline is certainly a verb -- even imperative mood, so not just asking for information.
> > > > Why do you need information if you can't affect the outcome?
> > >
> > > I want to know it. First, because it's valuable information in and by itself.
> > > Second, because it teaches me something. Third, because I can then possibly
> > > decide to not factor out (may be wrong, but still, I can measure...).
> > > Glasnost for compilers! ;-)
> >
> > Glasnost! :)
> >
> > How about the meta-namespace then:
> >
> > static if( meta.inlined )
> > {
> > writeln("got it!");
> > }
> >
>
> Why not:
>
> void foo() { printf("da\n"); }
>
> const bool bar = @glasnost.inlined(foo);
>
> or
>
> const bool bar = __glasnost << inlined!foo;
>
Ideally, you also want to be able to request inlining at the place of calling a function, not only at the definition of the function.
More information about the Digitalmars-d
mailing list