<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Blech, looking at the change:<BR> <BR><br>Generally size optimizations beat speed optimizations.<br>Those lookup tables are wasteful. And tedious to read/write<br>for a human, vs., the clear compact logic I put in.<BR>And as I said, division/mod by a constant is efficient, at least on 32bit systems with 64bit operations.<BR>Hm. I tried 64bit div and that was still optimized into a multiplication.<BR>The code size for that is going to be much smaller than the tables.<BR>And the affects on cache probably better too.<BR><br> <BR>Generally I find "if (variable relation constant)"<br>easier to read than "if (constant relation variable)".<br>I understand the isomorphisms, but it is still more<br>usual to state the first.<BR> <BR><br>2K is a pretty small buffer size these days.<br>Even 64K that I chose is small.<BR><br> <BR>Yes I know I'm arguing both sides of size here.<br>One is code size, the other is buffer size.<BR><br> <BR>Integer to text has been implemented countless times.<br>I suspect my way with one table is way more common<br>than your way with three tables.<BR> <BR><br> - Jay<br><br><br><br> <BR><div><div id="SkyDrivePlaceholder"></div>> Date: Tue, 4 Sep 2012 16:43:27 +0000<br>> To: m3commit@elegosoft.com<br>> From: hosking@elego.de<br>> Subject: [M3commit] CVS Update: cm3<br>> <br>> CVSROOT:      /usr/cvs<br>> Changes by:      hosking@birch.  12/09/04 16:43:27<br>> <br>> Modified files:<br>>    cm3/m3-sys/m3middle/src/: M3Buf.m3 <br>> <br>> Log message:<br>>     ChunkSize was exposed elsewhere.  I agree with Jay that it may be better to be<br>>    consistent, but leave the rest as was for efficiency.<br>> <br></div>                                        </div></body>
</html>