TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Make a Lisp in Nim

102 pointsby def-about 10 years ago

4 comments

pkukiabout 10 years ago
I thought it could be interesting to see ratio of program performance to its length. If I didn&#x27;t make any mistake it looks like that:<p><pre><code> perf3 perf3 &#x2F; macros chars chars * 100 ------------------------------------------------- scala 15963 24885 64,15 nim 11121 20263 54,88 java 17969 53223 33,76 ocaml 7063 24371 28,98 coffee 2326 15653 14,86 racket 2461 17229 14,28 cs 5414 45039 12,02 clojure 1174 10099 11,62 ruby 1255 13247 9,47 go 3048 36321 8,39 vb 4523 58099 7,78 rust 4084 56516 7,23 js 1726 26437 6,53 c 3649 73047 5,00 haskell 1163 30115 3,86 python 304 19632 1,55 forth 563 44715 1,26 php 331 27332 1,21</code></pre>
评论 #9149932 未加载
评论 #9155980 未加载
shared4youabout 10 years ago
Are your graphs up to date ? Seems just an hour ago [1]:<p>&gt; Rust: build with --release. 10X performance boost!<p>That might mean that Rust would top the charts instead of Nim.<p>[1]: <a href="https://github.com/kanaka/mal/commit/434516e0d172904e06b05f6dee83ce2e7859b950" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;kanaka&#x2F;mal&#x2F;commit&#x2F;434516e0d172904e06b05f6...</a>
评论 #9146272 未加载
评论 #9146220 未加载
评论 #9146334 未加载
jeremycwabout 10 years ago
Can someone explain the huge performance difference between nim and C? I though nim compiled to C, therefore I would think that good handwritten C would more or less be the upper performance bound for nim.
评论 #9148565 未加载
评论 #9148979 未加载
评论 #9149123 未加载
perturbationabout 10 years ago
I had this idea as well (after seeing Make a Lisp on HN). Anything that you found challenging in porting the Python version to Nim?
评论 #9146119 未加载