[Numpy-discussion] A proposal to implement round in C Was: Rookie problems - Why is C-code much faster?

Bill Baxter wbaxter at gmail.com
Thu Feb 23 17:47:15 CST 2006

Generally, C99 support in MSVC.NET is pretty much nil, except for maybe
support for "inline" (which MS had already added prior to the C99
standard).  This wikipedia article links to a quote from the Visual C++
program manager at Microsoft saying "In general we don't see a lot of demand
for C99 features":
So it's not clear the situtation will change any time soon.  I don't know if
VC8 is any better in its C99 support.  I doubt it.  Wikipedia says Borland
is dragging their feet too.


On 2/24/06, Bill Baxter <wbaxter at gmail.com> wrote:
> There doesn't seem to be any rint() round() or nearestint() defined in
> MSVC 7.1.  Can't find it in an MSDN search either.  I think that's why a
> lot of people in the game biz, at least, use that lrintf function written
> using intrinsics that I posted a link to earlier.  I first heard about that
> on the gd-algorithms mailing list.
> --Bill
> On 2/24/06, Travis Oliphant <oliphant.travis at ieee.org> wrote:
> >
> > Sasha wrote:
> >
> > >Rint ufunc and ndarray metod "round" are in svn.  x.round(...) is
> > >about 20x faster than around(x) for decimals=0 and about 6x faster for
> > >decimals>0.  The case decimals<0   is slower on integers, but it
> > >actually does something :-)
> > >
> > >
> > Great job.  Thanks for adding this, Sasha...
> >
> > I think many will enjoy using it.
> >
> > Regarding portability:  On my system rint says it conforms to BSD 4.3.
> > How portable is that?
> >
> > Can anyone try it out on say the MSVC compiler for windows?
> >
> > -Travis
> >
> >
> >
> >
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20060223/693c1a0d/attachment-0001.html 

More information about the Numpy-discussion mailing list