Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #35187
| From | Paul E Bennett <Paul_E.Bennett@topmail.co.uk> |
|---|---|
| Newsgroups | comp.lang.forth |
| Subject | Re: Program or be Programmed ! |
| Date | 2014-12-24 14:33 +0000 |
| Organization | Hidecs Consultancy |
| Message-ID | <cg016fFtk4aU1@mid.individual.net> (permalink) |
| References | <cfrte2Frt26U1@mid.individual.net> <OcydnVONz8oAFwTJnZ2dnUU7-a2dnZ2d@supernews.com> <cfu8olFga0mU1@mid.individual.net> <7x8uhxihxz.fsf@ruckus.brouhaha.com> |
Paul Rubin wrote: > Paul E Bennett <Paul_E.Bennett@topmail.co.uk> writes: >>>> : (DDA) ( S: sin\cos -- sin'\cos' ) >>>> ( This code is the main sine wave generator ) >>>> tuck over >>>> 256 / + -rot >>>> swap 256 / - swap >>>> ; >> Comments on the rest of the code and the coding style (which is my >> rough-out standard) are welcome. > > : h* ( n -- n ) 8 rshift ; > : (DDA) ( sin cos -- sin' cos') 2dup h* >r h* - swap r> + swap ; Thanks Paul, Just tried out the differences. My version was 58 bytes (22 instructions) in Vfxlin. Yours was 4 bytes (2 instructions) for h* and 22 bytes (10 instructions) for (DDA). I might make that change and see how it does speed- wise. -- ******************************************************************** Paul E. Bennett IEng MIET.....<email://Paul_E.Bennett@topmail.co.uk> Forth based HIDECS Consultancy.............<http://www.hidecs.co.uk> Mob: +44 (0)7811-639972 Tel: +44 (0)1235-510979 Going Forth Safely ..... EBA. www.electric-boat-association.org.uk.. ********************************************************************
Back to comp.lang.forth | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: Program or be Programmed ! Paul E Bennett <Paul_E.Bennett@topmail.co.uk> - 2014-12-23 01:05 +0000
Re: Program or be Programmed ! Andrew Haley <andrew29@littlepinkcloud.invalid> - 2014-12-23 09:30 -0600
Re: Program or be Programmed ! Paul E Bennett <Paul_E.Bennett@topmail.co.uk> - 2014-12-23 22:30 +0000
Re: Program or be Programmed ! Paul Rubin <no.email@nospam.invalid> - 2014-12-24 00:13 -0800
Re: Program or be Programmed ! Paul E Bennett <Paul_E.Bennett@topmail.co.uk> - 2014-12-24 14:33 +0000
csiph-web