Re: Different string format options, benefits?

agulbra@Siri.Unit.NO (Arnt Gulbrandsen)
Fri, 18 Oct 91 18:31:22 GMT

          From comp.compilers

Related articles
Different string format options, benefits? coxs2@rpi.edu (Sean C. Cox) (1991-10-16)
Re: Different string format options, benefits? pardo@cs.washington.edu (1991-10-17)
Re: Different string format options, benefits? pk@cs.tut.fi (1991-10-18)
Re: Different string format options, benefits? agulbra@Siri.Unit.NO (1991-10-18)
Re: Different string format options, benefits? db@dcs.ed.ac.uk (Dave Berry) (1991-10-20)
Re: Different string format options, benefits? tm@well.sf.ca.us (1991-10-22)
Re: Different string format options, benefits? buzzard@eng.umd.edu (1991-10-25)
Re: Different string format options, benefits? henry@zoo.toronto.edu (1991-10-25)
Re: Different string format options, benefits? sdm7g@aemsun.med.virginia.edu (1991-11-01)
Re: Different string format options, benefits? bliss@sp64.csrd.uiuc.edu (1991-11-05)
| List of all articles for this month |
Newsgroups: comp.compilers
From: agulbra@Siri.Unit.NO (Arnt Gulbrandsen)
Keywords: code, C
Organization: University of Trondheim, Norway
References: 91-10-061 91-10-072
Date: Fri, 18 Oct 91 18:31:22 GMT

Sean C. Cox <coxs2@rpi.edu> writes:
>[Tradeoffs of <size,bytes> vs <bytes,null> representation?]


On machines with very few registers it might be much faster to copy
<bytes,null> strings; 8 or 12-bit machines might require two registers to
store the length, and I know of one processor which only *has* three
registers. (The 6502.)


Today, with 32-bit architectures and loads of registers, it seems that
<size,bytes> is the better alternative. You have to align the string
anyway, and a single 32-bit register is necessary for the length.


--
Arnt Gulbrandsen agulbra@siri.unit.no
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.