提供一個LISP程式,運算測試誰的速度快吧!
AUTOCAD 2014 約 5.28秒
ZWCAD+ 2012版 5.44秒
發現ZWCAD+ 2012 與AUTOCAD 2014 滿接近的,效能不錯
;;載入指令 TEST
(defun c:test (/ nn times timee tall)
(setvar "CMDECHO" 0)
(setq mm (getvar "osmode"))
(setvar "osmode" 0)
(princ "\nTest number <2>: ")
(setq nn (getint))
(if (= nn nil) (setq nn 2))
(princ "\nTest start .... ")
(setq times (getvar "tdusrtimer"))
(if (<= nn 1) (setq nn 1))
(setq m1 1)
(while (> nn 0)
(grtext -1 (strcat "Test nnumber .. " (rtos m1 2 0)))
(test_speed)
(setq nn (- nn 1) m1 (+ m1 1))
)
(setvar "osmode" mm)
(setq timee (getvar "tdusrtimer"))
(setq tall (* (- timee times) 100000))
(princ "\nTest time Total: ")
(princ tall)
(print)
)
(defun test_speed ()
(command "_.erase" "_all" "")
(command "_.layer" "_m" "w4" "_c" "1" "" "")
(command "_.limits" "-300,-300" "300,300")
(command "_.zoom" "_a")
(command "_.layer" "_set" "0" "")
(command "_.layer" "_m" "w5" "_c" "2" "" "")
(grtext -1 (strcat "Test nnumber .. " (rtos m1 2 0)))
(command "_.pline" "-350,-250" "350,-250" "350,250" "-350,250" "_c")
(command "_.pline" "-300,-200" "300,-200" "300,200" "-300,200" "_c")
(command "_.pline" "-250,-150" "250,-150" "250,150" "-250,150" "_c")
(command "_.pline" "-200,-100" "200,-100" "200,100" "-200,100" "_c")
(command "_.pline" "-150,-50" "150,-50" "150,50" "-150,50" "_c")
(command "_.layer" "_m" "w6" "_c" "3" "" "")
(grtext -1 (strcat "Test nnumber .. " (rtos m1 2 0)))
(command "_.circle" "0,0" "60")
(command "_.circle" "0,0" "70")
(command "_.circle" "0,0" "80")
(command "_.circle" "0,0" "90")
(command "_.circle" "0,0" "100")
(command "_.circle" "0,0" "110")
(command "_.circle" "0,0" "120")
(command "_.circle" "0,0" "130")
(command "_.circle" "0,0" "140")
(command "_.circle" "0,0" "150")
(command "_.circle" "0,0" "160")
(command "_.circle" "0,0" "170")
(command "_.circle" "0,0" "180")
(command "_.circle" "0,0" "190")
(command "_.circle" "0,0" "200")
(command "_.circle" "0,0" "210")
(command "_.circle" "0,0" "220")
(command "_.circle" "0,0" "230")
(command "_.circle" "0,0" "240")
(command "_.circle" "0,0" "250")
(command "_.circle" "0,0" "260")
(command "_.circle" "0,0" "270")
(command "_.circle" "0,0" "280")
(command "_.circle" "0,0" "290")
(command "_.circle" "0,0" "300")
(command "_.circle" "0,0" "310")
(command "_.circle" "0,0" "320")
(command "_.circle" "0,0" "330")
(command "_.circle" "0,0" "340")
(command "_.circle" "0,0" "350")
(command "_.circle" "0,0" "360")
(command "_.circle" "0,0" "380")
(command "_.circle" "0,0" "390")
(command "_.circle" "0,0" "400")
(command "_.zoom" "_e")
(command "_.zoom" "0.9")
(command "_.zoom" "0.8")
(command "_.zoom" "0.7")
(command "_.zoom" "0.6")
(command "_.zoom" "0.5")
(command "_.zoom" "0.4")
(command "_.zoom" "0.3")
(command "_.zoom" "0.2")
(command "_.zoom" "0.1")
(command "_.zoom" "0.01")
(command "_.zoom" "_e")
(command "_.zoom" "0.9")
(command "_.zoom" "0.8")
(command "_.zoom" "0.7")
(command "_.zoom" "0.6")
(command "_.zoom" "0.5")
(command "_.zoom" "0.4")
(command "_.zoom" "0.3")
(command "_.zoom" "0.2")
(command "_.zoom" "0.1")
(command "_.zoom" "0.01")
(command "_.zoom" "_e")
(command "_.zoom" "0.9")
(command "_.zoom" "0.8")
(command "_.zoom" "0.7")
(command "_.zoom" "0.6")
(command "_.zoom" "0.5")
(command "_.zoom" "0.4")
(command "_.zoom" "0.3")
(command "_.zoom" "0.2")
(command "_.zoom" "0.1")
(command "_.zoom" "0.01")
(command "_.zoom" "_e")
(command "_.zoom" "0.9")
(command "_.zoom" "0.8")
(command "_.zoom" "0.7")
(command "_.zoom" "0.6")
(command "_.zoom" "0.5")
(command "_.zoom" "0.4")
(command "_.zoom" "0.3")
(command "_.zoom" "0.2")
(command "_.zoom" "0.1")
(command "_.zoom" "0.01")
(command "_.zoom" "_e")
(command "_.zoom" "0.9")
(command "_.zoom" "0.8")
(command "_.zoom" "0.7")
(command "_.zoom" "0.6")
(command "_.zoom" "0.5")
(command "_.zoom" "0.4")
(command "_.zoom" "0.3")
(command "_.zoom" "0.2")
(command "_.zoom" "0.1")
(command "_.zoom" "0.01")
(command "_.zoom" "_e")
(command "_.erase" "_all" "")
(command "_.limits" "-100,-100" "2500,2100")
(command "_.zoom" "_a")
(command "_.layer" "_m" "w7" "_c" "4" "" "")
(grtext -1 (strcat "Test nnumber .. " (rtos m1 2 0)))
(command "_.polygon" "4" "0,0" "_c" "10")
(command "_.ARRAY" "_L" "" "_r" "47" "65" "40" "40")
(command "_.zoom" "_e")
(command "_.redraw")
(command "_.regen")
(command "_.hide")
(command "_.erase" "_all" "")
(command "_.redraw")
)
(princ)
沒有留言:
張貼留言