skx / yal

Yet another lisp interpreter
GNU General Public License v2.0
16 stars 0 forks source link

nth is slow #75

Closed skx closed 1 year ago

skx commented 1 year ago

The sorting.lisp example does some stuff:

However the last step is incomplete - we generate a list of 512 integers, however we only test the first 20 or so results. While that's probably indicative of success it isn't sufficient to prove it.

The reason we don't test all the numbers is because the operation of (nth) is so. damn. slow.

nth could be moved to golang, to make it super-fast, or it could be improved in other ways. Decide, and do the necessary.