惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - 三生石上(FineUI控件)
月光博客
月光博客
S
SegmentFault 最新的问题
有赞技术团队
有赞技术团队
Stack Overflow Blog
Stack Overflow Blog
Engineering at Meta
Engineering at Meta
T
The Blog of Author Tim Ferriss
The GitHub Blog
The GitHub Blog
小众软件
小众软件
Hugging Face - Blog
Hugging Face - Blog
IT之家
IT之家
宝玉的分享
宝玉的分享
A
About on SuperTechFans
Vercel News
Vercel News
P
Proofpoint News Feed
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
博客园 - 【当耐特】
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
V
Visual Studio Blog
Jina AI
Jina AI
Y
Y Combinator Blog
T
Tailwind CSS Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Last Week in AI
Last Week in AI

博客园 - NeilChen

恢复 Windows 7 的“回到父目录”按钮 FireFox 脑残的安全设定 SQL Server 事务自动回滚 下载 infoq 网站视频 也做了一下腾讯前端面试题 Select prototyping tools Lisp in Small Parts TechTalk by Peter Seibel on Common Lisp 时隔3年,再做双倍超立方数的题目,这次用Lisp Racket, SICP stream learning Operation is not valid due to the current state of the object lisp 笔记 - 闭包 Common Lisp 在 Windows 上的开发环境比较 翻译英文技术文章是一件很可耻的事情吗? 写了个博客备份的 ruby 程序 试用 Portable Allegro Serve Windows XP, Emacs, CLisp, SLIME 关于 Business Rule Engine Irony - 一个 .NET 语言实现工具包
体验 Clozure CL
NeilChen · 2011-12-20 · via 博客园 - NeilChen

Clozure CL 简称 CCL. 网站在 http://ccl.clozure.com/

是一个高性能的开源 Common Lisp 实现,其特性包括 native 线程的支持等等。还包括一个 IDE,但好像只是 for Mac 的。windows 上估计跑不起来。不过不要紧,我也可以将它 setup 到 Emacs 中。

CCL 可以通过 svn 直接下载到本机的一个目录。然后打开 .emacs.d\init.el 文件,将原先 clisp 的配置注释掉,加入一行指向 CCL 的 exe 即可:

;(setq inferior-lisp-program "clisp")
(setq inferior-lisp-program "e:/ccl/wx86cl.exe")

接下来我简单的测试对比了一下 clisp 和 CCL 的性能。各进行1千万次简单的加法运算:

clisp:

CL-USER> (time (loop for i from 1 to 10000000 do (+ 100 100)))
Real time: 16.82791 sec.
Run time: 16.8125 sec.
Space: 4580 Bytes
NIL

CCL:

CL-USER> (time (loop for i from 1 to 10000000 do (+ 100 100)))
(LOOP FOR I FROM 1 TO 10000000 DO (+ 100 100)) took 78 milliseconds (0.078 seconds) to run 
                    with 2 available CPU cores.
During that period, 78 milliseconds (0.078 seconds) were spent in user mode
                    0 milliseconds (0.000 seconds) were spent in system mode
 32 bytes of memory allocated.
NIL

天壤之别!CCL 还利用上了我电脑上的双核 CPU. 比较下来 clisp 的性能可以用垃圾来形容。而且,CCL 是支持多线程的,clisp 不支持。

虽然 clisp 性能差,不过,目前来说保留它的理由是可以用来运行 Portable Allegro Serve 的代码。而我粗略的试了一下在 CCL 下跑这个代码会报错。