X-Git-Url: http://git.kpe.io/?p=umlisp.git;a=blobdiff_plain;f=create-sql.lisp;h=697ecb0a0eb858260cb67f8c9387b510773ac0d9;hp=fc8fc8425353c8ab3b844f78c512aec736172299;hb=88be55a3921b3078570bb737da197c671117a719;hpb=3db136b81ed93cbffde0597bf684d2366860e0f2 diff --git a/create-sql.lisp b/create-sql.lisp index fc8fc84..697ecb0 100644 --- a/create-sql.lisp +++ b/create-sql.lisp @@ -421,9 +421,9 @@ This is much faster that using create-umls-db-insert." (declare (optimize (speed 3) (space 0))) (ensure-ucols+ufiles) (let ((max 0)) - (declare (fixnum max)) + (declare (type (integer 0 1000000) max)) (dolist (ucol *umls-cols*) - (when (> (cmax ucol) max) + (when (> (the (integer 0 1000000) (cmax ucol)) max) (setq max (cmax ucol)))) max)) @@ -434,7 +434,11 @@ This is much faster that using create-umls-db-insert." (let ((rowsizes '())) (dolist (file *umls-files*) (let ((row 0)) + (declare (type (integer 0 1000000) row)) (dolist (ucol (ucols file)) - (incf row (1+ (cmax ucol)))) + (let* ((col-max (cmax ucol)) + (max-with-delim (1+ col-max))) + (declare (type (integer 0 1000000) col-max max-with-delim)) + (incf row max-with-delim))) (push row rowsizes))) (car (sort rowsizes #'>))))