xpcom/xpcom-private.h.in
author Steve Snyder <swsnyder@snydernet.net>
Thu, 01 Oct 2009 14:19:41 -0400
changeset 33346 8a43f01f1d6478ad072c1f4a41fb633f8a5e3a32
parent 1 9b2a99adc05e53cd4010de512f50118594756650
child 94475 f4157e8c410708d76703f19e4dfb61859bfe32d8
permissions -rw-r--r--
Bug 512865. qcms: Improve SSE2 performance, add SSE support. r=jrmuizel This patch greatly improves the performance of QCMS transformations on x86 & x86_64 systems. Some notes: 0. On 32-bit x86 systems it does runtime selection between non-SIMD, SSE, and SSE2 code paths. 1. On x86_64 systems the SSE2 code path is always taken. The non-SIMD and SSE code paths are left intact, but contemporary versions of the GCC and MSVC compilers will see that they cannot be reached and optimize them away. 2. The execution of the SSE2 code path is reduced by 67%, relative to the original Intel/Microsoft formatted ASM code. The relative performance is seen on a Pentium4 (Northwood) 2.4GHz CPU with DDR1 RAM. 3. The SSE code path provides a 80% reduction in execution time, relative to the non-SIMD code path. The relative performance is seen on a Pentium3 (Coppermine) 1.26GHz CPU with SDRAM. 4. The code has been split out into separate files so that it can be built with different cflags (-msse, and -msse2) when using gcc. 5. Try to land again, this time with __attribute__((__force_align_arg_pointer__)) to avoid crashes on linux.

/* The following defines are only used by the xpcom implementation */

#ifndef _XPCOM_PRIVATE_H_
#define _XPCOM_PRIVATE_H_

/* Define if getpagesize() is available */
#undef HAVE_GETPAGESIZE

/* Define if iconv() is available */
#undef HAVE_ICONV

/* Define if iconv() supports const input */
#undef HAVE_ICONV_WITH_CONST_INPUT

/* Define if mbrtowc() is available */
#undef HAVE_MBRTOWC

/* Define if <sys/mount.h> is present */
#undef HAVE_SYS_MOUNT_H

/* Define if <sys/vfs.h> is present */
#undef HAVE_SYS_VFS_H

/* Define if wcrtomb() is available */
#undef HAVE_WCRTOMB

#endif /* _XPCOM_PRIVATE_H_ */