-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 [email protected] schrieb: > Dear Philipp, > >> thanks for your help with Z80 multiplication. > > Thank you for your answer! > >> study, but it has been shown, that small integer values are far more >> common than bigger ones. AFAIR values 0,1,2 combined are about as likely >> to occur as all other values combined in an 8 bit integer. > > I'm sure you are right, because "char" is often used to store "boolean" > values or for small cycles. But the real question is: are those values > used as operands in multiplications? > If you use the byteXbyte product as a building block for some more complex > mathematical function, you usually have "random" bytes to handle. If you > use it to access elements of a bi-dimensional array A[x+ROWLEN*y], then > the result must be small... and so must be the two operands.
I finally found some useful statistics: In "The New C Standard - An Economical and Cultural Commentary", on page 1144, see figures 1143.2. It has info on how common char values are when used as operands to * and /. Unfortunately it's not much, but it might be insightful. Philipp -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAknd5CMACgkQbtUV+xsoLppFXgCgg4LXzEmJLixT1tJ6sBA3ySfn IAMAn3kNOtDeAGj+L0Sx9YjDq7CPdhzs =rCA4 -----END PGP SIGNATURE----- ------------------------------------------------------------------------------ This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com _______________________________________________ Sdcc-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/sdcc-user
