Date: Sat, 7 Sep 1996 14:06:46 -0700 (PDT) From: Bruce Evans <bde> To: CVS-committers, cvs-all, cvs-sys Subject: cvs commit: src/sys/i386/boot/biosboot sys.c Message-ID: <199609072106.OAA10556@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199609072106.OAA10556>
