Rewriting db-fetch-query-results
authorNathan Bird <nathan@acceleration.net>
Sat, 28 Feb 2009 20:17:39 +0000 (15:17 -0500)
committerNathan Bird <nathan@acceleration.net>
Sat, 28 Feb 2009 20:37:09 +0000 (15:37 -0500)
commitb420af1faece44169b08ab4bdf3a98833c32e896
treeeb0bd46402a080a53613d8e4f2aff281475391e8
parentd39d60ec68a2f5c2909b891ca949cb5ca39d39f5
Rewriting db-fetch-query-results
After [d39d60ec68a2f5c2909b891ca949cb5ca39d39f5] I realized that the array was being dereferenced every row of the results.
This patch creates a set of closures for reading the columns, and then maps across those closures on each row.

On SBCL 1.0.25:
a query that returns ~2k rows, repeated 50 times is about 3% faster, same memory
a query that returns 1 row repeated 2000 times is about the same speed, 10% GREATER memory

Going to revert this patch, but wanted to have it recorded.
db-odbc/odbc-dbi.lisp