2
如何使用DrScheme分析我的功能?如何在DrScheme中進行配置?
(require profile)
(define (factorial n)
(cond
((= n 1) 1)
(else (* n (factorial (- n 1))))))
(profile factorial)
上面的代碼返回
Profiling results
-----------------
Total cpu time observed: 0ms (out of 0ms)
Number of samples taken: 0 (once every 0ms)
====================================
Caller
Idx Total Self Name+srcLocal%
ms(pct) ms(pct) Callee
====================================
>
我想: - (配置文件(階乘100))
- (輪廓階乘)(階乘100)
但它給了我同樣的結果。 我在做什麼錯?
我也試過,但它沒有工作:( – unj2 2009-07-01 02:59:43