From owner-cvs-sys Sat Sep 7 14:06:56 1996 Return-Path: owner-cvs-sys Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id OAA10585 for cvs-sys-outgoing; Sat, 7 Sep 1996 14:06:56 -0700 (PDT) Received: (from bde@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id OAA10556; Sat, 7 Sep 1996 14:06:46 -0700 (PDT) Date: Sat, 7 Sep 1996 14:06:46 -0700 (PDT) From: Bruce Evans Message-Id: <199609072106.OAA10556@freefall.freebsd.org> To: CVS-committers, cvs-all, cvs-sys Subject: cvs commit: src/sys/i386/boot/biosboot sys.c Sender: owner-cvs-sys@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk bde 96/09/07 14:06:45 Modified: sys/i386/boot/biosboot sys.c Log: Saved 48 bytes (46 before padding) using assorted nano-optimizations: - avoiding strcmp("?" saved 12 bytes. gcc inlined the strcmp() but this takes as much or more code as a function call. The inlining was bogus because the strcmp() in the bootstrap isn't standard. - using a char instead of an int for the boolean `last_only' saved 8 bytes. Booleans should usually be represented as chars on the i386. - simplifying the return tests saved 9 bytes. - using putc instead of printf to print a newline saved 3 bytes of code and 2 bytes of const data. - avoiding `else's by always doing the else clause and fixing it up saved 4+8 bytes. Revision Changes Path 1.12 +14 -13 src/sys/i386/boot/biosboot/sys.c