You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by Tim Ellison <t....@gmail.com> on 2008/03/13 12:33:24 UTC

Re: [classlib][archive] zlib performance

Mark Hindess wrote:
> Your message reminded me that I had noticed that my debian packages
> for M5 - which use -Dhy.local.zlib=true - have better performance for
> inflate/deflate than the M5 releases.  Given that we are unlikely to
> need to debug into the zlib code, perhaps we should *always* compile the
> zlib code with optimizations.  After all it isn't really "our" code, we
> are unlikely to change it and it hasn't changed since 2005.

+1

> Debian compile with -O3 and with -DUNALIGNED_OK (on x86 and x86_64) and
> my tests with minigzip show that these are reasonable choices.

On Windows we are compiling fdlibm with "-Oityb1" which means:
   i = enable intrinsic functions
   t = favor code speed
   y = enable frame pointer omission
   b1 = inline expansion level=1

whereas on zlib we are using the default compiler args "-Zi -Od"
   Zi = enable debugging information
   Od = disable optimizations

> I would expect that this would improve eclipse startup performance.

I would expect it improves all start-up performance since we also have 
to read our own JARs.

Unless anyone objects I'll change the ARCHIVE makefiles to always 
optimize zlib:

> Index: src/main/native/zlib/unix/makefile
> ===================================================================
> --- src/main/native/zlib/unix/makefile	(revision 634609)
> +++ src/main/native/zlib/unix/makefile	(working copy)
> @@ -17,6 +17,9 @@
>  # Makefile for module 'zlib'
>  #
>  
> +# Always build in release mode
> +HY_CFG=release
> +
>  include $(HY_HDK)/build/make/defines.mk
>  
>  ZLIB_DIST=../../zlib_dist/# Path to zlib
> Index: src/main/native/zlib/windows/makefile
> ===================================================================
> --- src/main/native/zlib/windows/makefile	(revision 634609)
> +++ src/main/native/zlib/windows/makefile	(working copy)
> @@ -17,6 +17,9 @@
>  # Makefile for module 'zlib'
>  #
>  
> +# Always build in release mode
> +HY_CFG=release
> +
>  !include <$(HY_HDK)\build\make\defines.mak>
>  
>  LIBBASE=hyzlib


Regards,
Tim