diff options
Diffstat (limited to 'TODO')
| -rw-r--r-- | TODO | 29 |
1 files changed, 13 insertions, 16 deletions
@@ -1,20 +1,17 @@ -Aha! I knew there had to be a way. The old keyboard shortcutting -code (which uses chess-legal-plies) was just way to slow. On modern -machines you couldn't notice it, but on my 300 MHz laptop in battery -save mode, even with the byte-compiled files, I spent 1/4 of my time -looking at the hourglass cursor. So I kept chewing on the algorithm, +delYsid: I knew there had to be a way. The old keyboard shortcutting +code (which uses chess-legal-plies) was just to slow. On modern +machines you wouldn't notice it, but on my 300 MHz laptop in battery +saving mode, even with byte-compiled files, I spent 1/4 of my time +looking at the hourglass cursor. So I kept cleaning the algorithm, dropping the number of calls to chess-search-position (the biggest and -slowest function in all of chess.el) from 5400 calls down to 4300 -calls. But still it was slow. Then I thought about it long and hard, -and realized chess-legal-plies was going about its whole job -backwards. Since that function is only used by keyboard shortcutting, -I found a way to optimize it for that task, while keeping it as -general as before (by adding a "piece-or-color" argument). The net -result is that I got the number of calls to chess-search-position down -to 797!! That's 5000 calls less. It dropped the number of uses of -`chess-incr-index' by 20,000. The new code is so fast I that when -it's byte-compiled, I never see an hourglass cursor, even on my -laptop. +slowest function in chess.el) from 5400 calls down to 4300 calls. But +still it was too slow. Then I thought about it long and hard, and +realized chess-legal-plies was going about its whole job backwards. I +found a way to optimize it that resulted in dropping the number of +calls to chess-search-position down to 797!! That's 5000 fewer calls. +The new code is so fast I that when it's byte-compiled, I never see an +hourglass cursor, rarely even when un-byte-compiled in my slowest +configuration! - Feature work remaining: |
