jkotlinski / durexforth

Modern C64 Forth
Other
230 stars 28 forks source link

Size optimize sin.fs #474

Open jkotlinski opened 2 years ago

jkotlinski commented 2 years ago

sin.fs takes 2.7K on disk, that is more than needed.

An obvious optimization is to only store the first quarter and extrapolate the others.

Other ideas are possible, for example reuse BASIC SIN.

IanWitham commented 1 year ago

One solution could be to expose the Kernal trig routines and possibly provide helper words to precompute tables of a given length if needed. e.g. sintbl ( length -- addr )