2 ms·
There's a much under-rated rush that comes with your first real optimisation job. Mine was with a program to simplify square roots into surds - we'd had the les
by taneq 9y ago
There's a much under-rated rush that comes with your first real optimisation job. Mine was with a program to simplify square roots into surds - we'd had the lesson on them in year 10, then been given a sheet of about 100 different square roots to simplify. It was repetitive grunt work and so I wrote a program to do it. The first version worked, but was too slow (it simply tried number from 0 to N/2, checked if it was square, then checked if it was divisible) so I did the obvious thing and instead only checked square numbers, taking it from O(N) to O(SQRT(N)). Simple enough but it made me happy. :)