4 ms·
couple of quotes from the article: It's SICP that I want to preserve, not Scheme. For writing real-world code, what you want is aggressive optimization, and a
by signa11 11y ago
couple of quotes from the article:
It's SICP that I want to preserve, not Scheme.
For writing real-world code, what you want is aggressive optimization, and access to libraries for up-to-the-minute solutions to real-world problems.
and ofcourse, this mindset is _exactly_ right in the context of a course for teaching programming. as much as we might fantasize about it, computers are made of metal, not lambda calculus :)
- gus_massa 11y agoI know more about Racket (that is very similar to Scheme). The compiler does a very aggressive optimizations and inlines many of the lambdas. You can write nice understandable code with lambdas, but under the hood many of them are removed and the actual running code is similar to the imperative version. In Haskell there are a lot of abstractions, the compiler is also very aggressive, but I don't know the details. Anyway, in the "Computer Language Benchmarks Game", most of the programs in Haskell and Racket are much faster (> 10x) than Python. http://benchmarksgame.alioth.debian.org/u32/compare.php?lang=ghc&lang2=python3 http://benchmarksgame.alioth.debian.org/u32/compare.php?lang... http://benchmarksgame.alioth.debian.org/u32/compare.php?lang=racket&lang2=python3 http://benchmarksgame.alioth.debian.org/u32/compare.php?lang... (But I like the saying: There are lies, dammed lies, statistics and microbenchmarks.)
- igouy 11y ago"After all, facts are facts, and although we may quote one to another with a chuckle the words of the Wise Statesman, 'Lies--damned lies--and statistics,' still there are some easy figures the simplest must understand, and the astutest cannot wriggle out of." Leonard Henry Courtney, 1895 Also, those are "toy programs" not "microbenchmarks".