Thread overview | ||||||
---|---|---|---|---|---|---|
|
July 13, 2010 [phobos] std.instrinsic? | ||||
---|---|---|---|---|
| ||||
Why is the intrinsic module in phobos instead of druntime? In core.bitop, there's this odd code: version(D_Ddoc) { /** docs for bsf **/ int bsf(uint v); /** docs for bsr **/ int bsr(uint v); ... } else { public import std.intrinsic; } ???? I want to use bsr in lifetime.d, there's a hand-implemented function in there that's much much slower than the bsr instruction. -Steve |
July 13, 2010 [phobos] std.instrinsic? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Steve Schveighoffer | See this thread in the druntime list: http://lists.puremagic.com/pipermail/d-runtime/2010-June/000024.html I completely agree. :) On Tue, 13 Jul 2010, Steve Schveighoffer wrote: > Date: Tue, 13 Jul 2010 13:41:32 -0700 (PDT) > From: Steve Schveighoffer <schveiguy at yahoo.com> > Reply-To: Discuss the phobos library for D <phobos at puremagic.com> > To: Phobos <phobos at puremagic.com> > Subject: [phobos] std.instrinsic? > > Why is the intrinsic module in phobos instead of druntime? > > In core.bitop, there's this odd code: > > > > version(D_Ddoc) > { > /** docs for bsf **/ > int bsf(uint v); > > /** docs for bsr **/ > int bsr(uint v); > > ... > } > else > { > public import std.intrinsic; > } > > ???? > > I want to use bsr in lifetime.d, there's a hand-implemented function in there that's much much slower than the bsr instruction. > > -Steve > > > > > _______________________________________________ > phobos mailing list > phobos at puremagic.com > http://lists.puremagic.com/mailman/listinfo/phobos > |
July 13, 2010 [phobos] std.instrinsic? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Brad Roberts | :O
I didn't even know there was a druntime list. I should be posting all this stuff there. Sorry.
-Steve
----- Original Message ----
> From: Brad Roberts <braddr at puremagic.com>
> To: Discuss the phobos library for D <phobos at puremagic.com>
> Sent: Tue, July 13, 2010 4:47:14 PM
> Subject: Re: [phobos] std.instrinsic?
>
> See this thread in the druntime list:
>
> http://lists.puremagic.com/pipermail/d-runtime/2010-June/000024.html
>
> I completely agree. :)
>
> On Tue, 13 Jul 2010, Steve Schveighoffer wrote:
>
> > Date: Tue, 13 Jul 2010 13:41:32 -0700 (PDT)
> > From: Steve Schveighoffer <schveiguy at yahoo.com>
> > Reply-To: Discuss the phobos library for D <phobos at puremagic.com>
> > To: Phobos <phobos at puremagic.com>
> > Subject: [phobos] std.instrinsic?
> >
> > Why is the intrinsic module in phobos instead of druntime?
> >
> > In core.bitop, there's this odd code:
> >
> >
> >
> > version(D_Ddoc)
> > {
> > /** docs for bsf **/
> > int bsf(uint v);
> >
> > /** docs for bsr **/
> > int bsr(uint v);
> >
> > ...
> > }
> > else
> > {
> > public import std.intrinsic;
> > }
> >
> > ????
> >
> > I want to use bsr in lifetime.d, there's a hand-implemented function in
>there
>
> > that's much much slower than the bsr instruction.
> >
> > -Steve
> >
> >
> >
> >
> > _______________________________________________
> > phobos mailing list
> > phobos at puremagic.com
> > http://lists.puremagic.com/mailman/listinfo/phobos
> >
> _______________________________________________
> phobos mailing list
> phobos at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/phobos
>
|
July 13, 2010 [phobos] std.instrinsic? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Steve Schveighoffer | You can import core.bitop and it will work. I submitted a patch to have these be real intrinsics though and it has t been applied yet.
Sent from my iPhone
On Jul 13, 2010, at 1:41 PM, Steve Schveighoffer <schveiguy at yahoo.com> wrote:
> Why is the intrinsic module in phobos instead of druntime?
>
> In core.bitop, there's this odd code:
>
>
>
> version(D_Ddoc)
> {
> /** docs for bsf **/
> int bsf(uint v);
>
> /** docs for bsr **/
> int bsr(uint v);
>
> ...
> }
> else
> {
> public import std.intrinsic;
> }
>
> ????
>
> I want to use bsr in lifetime.d, there's a hand-implemented function in there that's much much slower than the bsr instruction.
>
> -Steve
>
>
>
>
> _______________________________________________
> phobos mailing list
> phobos at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/phobos
|
Copyright © 1999-2021 by the D Language Foundation