Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!ut-sally!im4u!rutgers!sri-unix!sri-spam!ames!ucbcad!ucbvax!decvax!decwrl!labrea!navajo!billw From: billw@navajo.STANFORD.EDU (William E. Westfield) Newsgroups: comp.lang.c Subject: Re: machines with oddball char * formats Message-ID: <1106@navajo.STANFORD.EDU> Date: Wed, 19-Nov-86 19:48:25 EST Article-I.D.: navajo.1106 Posted: Wed Nov 19 19:48:25 1986 Date-Received: Thu, 20-Nov-86 22:43:01 EST References: <1534@batcomputer.tn.cornell.edu> Organization: Stanford University Lines: 21 Summary: give up 77% of memory ? In article <1534@batcomputer.tn.cornell.edu>, garry@batcomputer) writes: > > Forgive my ignorance, but why don't the compiler writers on these "odd" > machines just designate a "char" and a "byte" to be the identical width > to a "short" ? What will go wrong ? > > (Would very many real-life application programs actually be hurt by the > added memory usage? - I'm excluding text editors!) > > It seems so simple - give some memory, get a lot more speed. > this is a word addressable machine. A short is 36 bits. Giving up some memory for the sake of speed is one thing, but you are talking about wasting 77% of the memory. Given paging, it probably wouldn't even be faster. For typical C code dealing with character stings or arrays, the byte operations asren't that much slower than individual memory moves, given cache, and the fact that the byte instructions auto-increment, and memory instructions don't. BillW