Changeset 30519 in project


Ignore:
Timestamp:
02/27/14 20:27:39 (7 years ago)
Author:
sjamaan
Message:

numbers: we *do* have exact-integer-sqrt, so use it!

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/4/numbers/trunk/benchmarks/cl-bench-bignum.scm

    r17615 r30519  
    3838       body? ...))))
    3939
    40 ;; This doesn't work since (isqrt <bignum>) will get truncated by conversion
    41 ;; to a double.  We need a native isqrt implementation before enabling the
    42 ;; first few benchmarks.
    43 (define (isqrt x) (floor (sqrt x)))
     40(define isqrt exact-integer-sqrt)
    4441
    4542(define pi 3141592653589793/1000000000000000)
     
    165162(print "run-elem-100-1000:")
    166163(time (run-elem-100-1000))
    167 ;; Enable these when we have an implementation of isqrt that works on bignums
    168 ;;(print "-----------------------------")
    169 ;;(print "run-elem-1000-100:")
    170 ;;(time (run-elem-1000-100))
    171 ;;(print "-----------------------------")
    172 ;;(print "run-elem-10000-1:")
    173 ;;(time (run-elem-10000-1))
     164(print "-----------------------------")
     165(print "run-elem-1000-100:")
     166(time (run-elem-1000-100))
     167(print "-----------------------------")
     168(print "run-elem-10000-1:")
     169(time (run-elem-10000-1))
    174170(print "-----------------------------")
    175171(print "run-pari-100-10:")
Note: See TracChangeset for help on using the changeset viewer.