This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: i386 rounding modes and workaround solution
>
> ----- Original Message -----
> From: "Han-Kwang Nienhuys" <h.nienhuys@amolf.nl>
> To: <gcc@gcc.gnu.org>
> Sent: Monday, September 10, 2001 7:47 AM
> Subject: i386 rounding modes and workaround solution
>
>
> > I recently found out that
> >
> > 1. converting float or double to int in gcc or g++ on an x86
> platform
> > is incredebly slow
>
> This is a gross over-simplification, considering that the
> conclusion depends so much on which compiler version, which
> options, and which CPU model you have. gcc-3.1 has important
> improvements. I have not seen an explanation as to why these
> operations were made slower in the gcc-3.0 series.
I guess the explanation is simple - the backend of 3.0 went trought almost
complete rewrite and someone has probably copied solutoin commonly used by
other compilers that time without benchmarking it. It appears to be better
(saving one stack slot) if you don't notice the stall.
Honza