Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!olivea!uunet!mcsun!ukc!icdoc!qmw-cs!eliot From: eliot@cs.qmw.ac.uk (Eliot Miranda) Newsgroups: comp.arch Subject: Re: Swizzling (very RISC) instead of 64 bits (was Re: 64 bit addresses) Message-ID: <3341@sequent.cs.qmw.ac.uk> Date: 14 Feb 91 21:02:19 GMT References: <1991Feb13.170045.16864@uicbert.eecs.uic.edu> Organization: Computer Science Dept, QMW, University of London, UK. Lines: 59 In article <1991Feb13.170045.16864@uicbert.eecs.uic.edu> wilson@uicbert.eecs.uic.edu (Paul Wilson) writes: >I don't know if 64-bit addressing is a good idea in general, and I suspect >it's a *bad* idea for languages like Lisp and Smalltalk, where the standard >implementation technique is to make everything the size of a pointer, >so that you can store either a pointer or a tagged "immediate" value >anywhere. Going to 64-bit addresses would *double* your memory >requirements. There are much better ways to spend transistors. > In a rather pedantic mode (appologies all) this is not quite so! In typical Smalltalk-80 systems many objects are bit objects (e.g. strings, symbols, bytecodes, bitmaps). When Smalltalk-80 implementations went from 16-bit pointers to 32-bit pointers the standard V2.0 image file grew from 598016 bytes (seriously folks!) to about 1 megabyte. I've just measured my image (whilst reading your message) and for a system with 40854 objects 899884 bytes were taken up by 32bit pointers, 702028 bytes by bit objects, and 163416 bytes by 4 byte object headers (40854*4). The average length in bytes of bit objects was 58.639 excluding the display screen's bitmap, (62.3648 bytes including the display screen's bitmap). Each bit object is padded at the end to a 32 bit boundary. The space wasted by the padding was 23737 bytes. If this were a 64 bit system padding to a 64 bit boundary, the wasted space would be 56447 bytes. So my image file should grow from about 40854 * 8 (8 byte object table entry per object) + 899884 + 702028 + 163416 bytes = 2092160 to 40854 * 16 + 899884 * 2 + 702028 + 56447 - 23737 + 163416 * 2 bytes = 3515002 bytes an expansion of 1.68. (Which is depressingly close to 2). But think of the new immediate values you could have! With 8 bit tags: Points(3529), Floats(291), <= 7 byte symbols (1067 symbols size <= 7 vs 4886 >= 8 in this image). <= 7 byte immutable strings (770 vs 1389) <= 7 byte bytecode arrays (also immutable) (1753 vs 4302) So thats at least 3529 * (16 (OTEntry) + 16 (x&y oops) + 8 (header)) + 291 * (16 (OTEntry) + 8 (value) + 8 (header)) + (1067+770+1753) * (16 (OTEntry) + 8 (data) + 8 (header)) less bytes = 265352 So now expansion is from 2092160 to (3515002-265352) which is a factor of 1.55. That was fun :-) -- Eliot Miranda email: eliot@cs.qmw.ac.uk Dept of Computer Science Tel: 071 975 5229 (+44 71 975 5229) Queen Mary Westfield College ARPA: eliot%cs.qmw.ac.uk@nsf.ac.uk Mile End Road UUCP: eliot@qmw-cs.uucp LONDON E1 4NS