TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Make a Lisp in Nim

102 点作者 def-超过 10 年前

4 条评论

pkuki超过 10 年前
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 未加载
shared4you超过 10 年前
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 未加载
jeremycw超过 10 年前
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 未加载
perturbation超过 10 年前
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 未加载