On Mar 14, 6:44 am, P Purkayastha <ppu...@gmail.com> wrote: > On Wednesday, March 14, 2012 4:54:32 AM UTC+8, François wrote: > > > On Tue, 13 Mar 2012 01:18:41 P Purkayastha wrote: > > > On Tuesday, March 13, 2012 3:41:35 PM UTC+8, Jeroen Demeyer wrote: > > > > If you do this, you certainly should not restrict yourself to the > > > > Graphite command line options, you should optimize gcc's flags in > > > > general (like adding -march for example). > > > > > Jeroen. > > > > If you do set -march, then *-march=native* is a pretty safe option. gcc > > > picks up many optimization flags by itself after detecting the cpu. I > > have > > > used this option for more than 3 years now for my whole Gentoo linux > > setup. > > > > But (of course) binaries made from -march=native can not be distributed. > > > -march=native only works on x86* other archs like ppc(64) are not > > supported. > > > Francois > > Interesting. I didn't know this. It seems -march=native is not present on > arm and -march is itself not available on ppc.
IIRC, '-march=native' (on Intel / AMD x86[_64] processors, which have a CPUID insn; likewise '-mtune=native') requires GCC >= 4,2.1; on PPC, you [only] have '-mcpu=...' and '-mtune=...' (while at least '- march=foo' implies '-mtune=foo'). Of course "native" only works as expected (or gives better performance) if the GCC present "knows" your CPU, i.e. has timing parameters for it (and probably knows newly added instructions or ISA extensions). Since OS distros and their packages are supposed to run on a broad variety of processors, their GCCs are configured (and all binary packages supplied are built) with quite generic (and hence suboptimal) settings. Also, tools like valgrind do not always know the latest processors (including all instructions generated by a more recent GCC). -leif -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org