4 ms·
> I don't doubt that you can write productive systems in CL (bit of a fan myself), but the "oh we have smart compilers that just make it as fast as C" just isn'
by lispm 9y ago
> I don't doubt that you can write productive systems in CL (bit of a fan myself), but the "oh we have smart compilers that just make it as fast as C" just isn't true.
But 50% of C is great. Imagine in Lisp you can achieve 50% performance of C. That means you can write large amounts of your code in Lisp, without the need to use C.
Actually it is both better and worse. One can achieve better than 50% and in many cases one is slower than 50% of C. For example you can optimize your code at runtime using the Lisp compiler. But in many cases you will be slower, since C compilers and libraries tend to have better support for hardware.
For many many applications 50% performance of C is completely sufficient. Zillions of lines of code are written in much slower environments...
- ealhad 9y agoIt must not be forgotten that performance isn't always the main concern, let alone the only one. And yeah, the expressiveness/speed ratio of Lisp is great.
- FrozenVoid 9y agoI don't deny it, just that that expressiveness has a cost and Lisp advocates assume that cost is negligible, while in reality it is important(Lisp Machines were created just so that Lisp would run at acceptable speed)
- lispm 9y agoLisp Machines were developed as a new breed of computers: personal workstations for AI researchers. Starting in the 80s a lot of people/companies made Lisp run with 'acceptable speed' on more conventional Personal Computers, once these got available.
- ealhad 9y agoThe thing is, back in the 80s (before I was even born!), the cost was huge, but it has stayed the same until now. So, yeah, it cannot best good C/C++, or even optimized Java, but it still outperforms any scripting language. You know what they say, the right tool for the right job.
- mpweiher 9y ago> But 50% of C is great. But 50% (2x) was the lower bound of the slowdown, it was at least twice as slow (from that article), and in the Turing Award lecture Stonebraker mentions an order of magnitude. Once again, I agree with most of your points, I just think the "we have magical compilers that make the overhead go away" (paraphrasing) is a bit too glib.
- FrozenVoid 9y ago50% of speed isn't the whole deal. Latency and memory use matter too. Audio,Video, Games, Networking,etc require minimal latency. Memory use is also critical: when you data structures explode into GBs of RAM, a twice larger means you can run out of RAM and start swapping to disk, lowering performance substantially. Finally 50% of speed in isolated benchmarks with minimal GC use doesn't mean 50% inside a complex application, where GC can pause the current thread or steal time continuously.
- lispm 9y agoI have a couple of Lisp Machines at home. They ran an object-oriented OS fully written in Lisp incl. window system, networking with TCP/IP, object-oriented database, text editor, graphics editor, 3d suite used by companies like Nintendo and Sony, mail server, file server, ... That thing ran on a 5 MIPS (Millions instructions per second) 40 bit processor with 40 MB RAM in the end 80s / early 90s. Suddenly with 1000 times more CPU speed, multi-core machines, fast GPUs, GBs of RAM, etc. it should not be possible to do that anymore? Because suddenly Lisp is too slow? Why was it fast enough to run that stuff in the 80s on tiny machines? Naughty Dog wrote Crash Bandicoot for the Playstation using a Common Lisp IDE and a specialized Scheme runtime for the Playstation. It sold millions of games and critics liked it for its fluid gameplay. Suddenly with machines much faster than the first Playstation this should no longer be possible?
- FrozenVoid 9y ago>Why was it fast enough to run that stuff in the 80s on tiny machines Lisp Machines were invented precisely because Lisp was slow on common hardware, hence the 8 extra tag bits. Lisp Machines are specialized Lisp hardware.
- lispm 9y agoLisp Machines were invented as the first personal workstations, because the common hardware was timeshared PDPs. The researchers wanted powerful personal computers with interactive user interfaces - something which did not exist at that time. Still that was not the question. The question was why 1000 times faster computers with much more space should not be able to run Lisp applications when in the 70s it was possible to run a whole OS on tiny machines.
- kazinator 9y agoThat basically means Lisp is probably about as fast as C because: C that is portable, easy to maintain, and robust against bad inputs also only runs at 50% of the speed of C. If you take any fast C program and add all the logic that is missing to make it robust and secure, and refactor it so that it is halfway nimble against changing requirements, it's no longer running at the mythical speed of C.