Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

What we anticipate seldom occurs; what we least expect generally happens. -- Bengamin Disraeli


devel / comp.lang.lisp / .Re: Road to Clojure Survey 2.0

SubjectAuthor
o .Re: Road to Clojure Survey 2.0Robert L.

1
.Re: Road to Clojure Survey 2.0

<suplg6$1ak$1@gioia.aioe.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=16894&group=comp.lang.lisp#16894

  copy link   Newsgroups: comp.lang.lisp
Path: i2pn2.org!i2pn.org!aioe.org!51iH3q7oRZapw4YGobHTdQ.user.46.165.242.75.POSTED!not-for-mail
From: No_spamming@noWhere_7073.org (Robert L.)
Newsgroups: comp.lang.lisp
Subject: .Re: Road to Clojure Survey 2.0
Date: Sat, 19 Feb 2022 02:43:19 -0000 (UTC)
Organization: Aioe.org NNTP Server
Message-ID: <suplg6$1ak$1@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Injection-Info: gioia.aioe.org; logging-data="1364"; posting-host="51iH3q7oRZapw4YGobHTdQ.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: XanaNews/1.18.1.6
X-Notice: Filtered by postfilter v. 0.9.2
 by: Robert L. - Sat, 19 Feb 2022 02:43 UTC

Raffael Cavallaro wrote:

>> we can do this in Clojure:
>> ((fn [n] (loop [x n, res 0]
>> (if (zero? x) res (recur (dec x) (+ x res)))))
>> 12345678)
>
> we can do this in common lisp:
>
> ((lambda (n) (loop for x from n downto 0 summing x)) 12345678)
>
> and when we do it in Clozure Common Lisp (dx86cl64) it runs 10 times as
> fast as your clojure code on the same machine.

(time ((lambda (n) (/ (* n (+ 1 n)) 2)) 12345678))
===>
cpu time: 0 real time: 0 gc time: 0
76207888812681


devel / comp.lang.lisp / .Re: Road to Clojure Survey 2.0

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor