I guess the performance is ok now with your approach 1



所有跟贴·加跟贴·新语丝科技论坛

送交者: AA 于 2005-9-14, 01:20:22:

回答: Why is that? 由 keyboard 于 2005-9-12, 21:36:53:

There are lots of LISP applications running very fast today, such as CLiki, a Wiki written in Common Lisp. I don't think approach 2 works, Von Neumann machine has improved its performance with decades of innovations for it, such as pipeline, risc, cache, out-of-order execution, etc.

The approach 1 doesn't bring it as good as C/C++, the reason is simple, because LISP is high-level language with advanced features that C/C++ doesn't have. Java has some features of LISP, but only part of. I remember (inacurately) that Java's inventor Guy Steele said he invented Java just trying to bring a small set of LISP features into C++.

But those advanced features are not necessarily working well for common programmers, or for common applications, just like Java is not stuiable to write an OS scheduler.

We had some study on the performance comparison of C/C++ vs. Java. We found some of the Java inefficiencies are inherent to the language itself, for example, garbage collection overhead, runtime pointer/bounds/type checkings, more memory accesses, and more branches. The comparison with LISP could be even drastic because of the whole difference in programming model.

I think the performance differences are not very critical to us actually because processors are going faster and faster. We may tolerate the relatively low performance of LISP. One more thing we need consider is that, single processor performance is hiting its wall, multicore looks like the next processor. But the problem with C/C++/Java is, it's hard to write multithreaded parallel programs. LISP may have potential advantages in this area with partial evaluations, or whatever techniques to exploit implicit parallelisms.

The key of LISP language is, as I said, its code is its data, all are lists in LISP. You produce a list, then you can execute it. This is very similar to the DNA structure (in my naive understanding), that it not only encodes our inheritance information as data, but also tells how to build a body with the data. Note: self-hosting and extensible. That's one reason why LISP was considered to be the AI language (together with Prolog, etc). This feature is neat, but I am not sure how important it is, since this feature can be achieved at object-level as well, again as I said.

I guess I am not qualified to discuss this topic since I am not deep into LISP. Just random thoughts for your reference.




所有跟贴:


加跟贴

笔名: 密码(可选项): 注册笔名请按这里

标题:

内容(可选项):

URL(可选项):
URL标题(可选项):
图像(可选项):


所有跟贴·加跟贴·新语丝科技论坛