C
Chris Dollin
av said:i have a routine R1 that with input A has output B that follow the
algo C.
optimisation is
search a routine R2 that with input A has output B that follow an algo
H that has minimum instructions for doing calculation
are we agreeing on that definition?
Sort of. Nearish. Along those lines. (People often say "optimisation"
and mean "improvement" or "dramatic improvement" rather than "can't
make it any faster".)
why i would not try to write the "H" routine?
EG:
Life is short and other things have priority.
H is not robust against requirement changes.
Making H take zero time would only improve overall performance
by 1%.
It isn't possible to write unit tests for H without destroying its
performance advantages.
The module containing R1 will anyway be thrown away next week
when the real data arrives.
H is very hard to understand. Likely someone else will break
it after you've changed projects.
H is subject to IP protection.
in my little experience errors could be in R1 too ...
and think on that routine can make to see errors in R1 too
If you want to work on making code better, as in less buggy,
work on making it better, not on making it faster.