Date: Fri, 30 Jun 2000 10:05:29 +0100 From: Roger Hardiman <roger@cs.strath.ac.uk> To: small@freebsd.org Subject: more on optimimise for size (was space) Message-ID: <395C62D9.4E9C8DA@cs.strath.ac.uk>
next in thread | raw e-mail | index | archive | help
Hi, Here are some results for building 'bridge' on 4.0-stable with -Os (optimize for size) passed to gcc instead of -O. Results looked good, but gzip let me down. 1) CHANGE THE OPTIMISATION FLAGS FOR GCC I built the kernel 4 times, with different optimisation settings. default optimise: gcc -O kernel is 1212593 bytes. better optimise: gcc -02 kernel is 1211345 bytes best optimise: gcc -O3 kernel is 1257613 bytes size optimise: gcc -Os kernel is 1203761 bytes GOOD NEWS FOR THE KERNEL Yippee. comparing 'size' to 'default' optimisation, we SAVE 8832 bytes, or 8K 2) COMPRESSING KERNEL WITH GZIP Then I gzipped the kernel files using gzip. default optimise: kernel.gz is 551628 bytes better optimise: kernel.gz is 559805 bytes. best optimise: kernel.gz is 576482 bytes. size optimise: kernel.gz is 554033 bytes. BAD NEWS FOR GZIP comparing 'size' to 'default' This is a 2.4k INCREASE. SUMMARY Optimise for size will make the kernel image 8k smaller but it will not make it fit on the floppy any better. Any comments on this? Platform FreeBSD 4.0-stable kernel (updated source yesterday) Bridge kernel but with some local modifications. (take out dummynet and ipfw, add new network card drivers) Roger -- Roger Hardiman Strathclyde Uni Telepresence Research Group, Glasgow, Scotland. http://www.telepresence.strath.ac.uk 0141 548 2897 roger@cs.strath.ac.uk To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-small" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?395C62D9.4E9C8DA>