<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://dynamo.iro.umontreal.ca/wiki/skins/common/feed.css?270"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://dynamo.iro.umontreal.ca/wiki/index.php?title=Programming_language_shootout:_mandelbrot&amp;feed=atom&amp;action=history</id>
		<title>Programming language shootout: mandelbrot - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://dynamo.iro.umontreal.ca/wiki/index.php?title=Programming_language_shootout:_mandelbrot&amp;feed=atom&amp;action=history"/>
		<link rel="alternate" type="text/html" href="http://dynamo.iro.umontreal.ca/wiki/index.php?title=Programming_language_shootout:_mandelbrot&amp;action=history"/>
		<updated>2013-05-21T11:00:25Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.16.4</generator>

	<entry>
		<id>http://dynamo.iro.umontreal.ca/wiki/index.php?title=Programming_language_shootout:_mandelbrot&amp;diff=257&amp;oldid=prev</id>
		<title>Bjlucier: /* Running */  Fix command line</title>
		<link rel="alternate" type="text/html" href="http://dynamo.iro.umontreal.ca/wiki/index.php?title=Programming_language_shootout:_mandelbrot&amp;diff=257&amp;oldid=prev"/>
				<updated>2008-09-03T04:17:53Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Running: &lt;/span&gt;  Fix command line&lt;/p&gt;
&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 04:17, 3 September 2008&lt;/td&gt;
		&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 95:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 95:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;==Running==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;==Running==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;gsi &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;mandelbrot &lt;/del&gt;-:m10000 3000 &amp;gt; output.pbm&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;gsi -:m10000 &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;mandelbrot &lt;/ins&gt;3000 &amp;gt; output.pbm&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Here I give it a 10MB minimum heap.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Here I give it a 10MB minimum heap.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Bjlucier</name></author>	</entry>

	<entry>
		<id>http://dynamo.iro.umontreal.ca/wiki/index.php?title=Programming_language_shootout:_mandelbrot&amp;diff=66&amp;oldid=prev</id>
		<title>Bjlucier: correct link to alioth</title>
		<link rel="alternate" type="text/html" href="http://dynamo.iro.umontreal.ca/wiki/index.php?title=Programming_language_shootout:_mandelbrot&amp;diff=66&amp;oldid=prev"/>
				<updated>2008-02-22T21:58:31Z</updated>
		
		<summary type="html">&lt;p&gt;correct link to alioth&lt;/p&gt;
&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 21:58, 22 February 2008&lt;/td&gt;
		&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;This is a Gambit implementation of the [http://shootout.alioth.debian.org/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;gp4&lt;/del&gt;/benchmark.php?test=mandelbrot&amp;amp;lang=all mandelbrot] benchmark of the [[Programming language shootout|Computer Language Benchmarks Game]].&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;This is a Gambit implementation of the [http://shootout.alioth.debian.org/&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;gp4sandbox&lt;/ins&gt;/benchmark.php?test=mandelbrot&amp;amp;lang=all mandelbrot] benchmark of the [[Programming language shootout|Computer Language Benchmarks Game]].&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;==The program==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;==The program==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Bjlucier</name></author>	</entry>

	<entry>
		<id>http://dynamo.iro.umontreal.ca/wiki/index.php?title=Programming_language_shootout:_mandelbrot&amp;diff=50&amp;oldid=prev</id>
		<title>Bjlucier: Add mandelbrot alioth benchmark</title>
		<link rel="alternate" type="text/html" href="http://dynamo.iro.umontreal.ca/wiki/index.php?title=Programming_language_shootout:_mandelbrot&amp;diff=50&amp;oldid=prev"/>
				<updated>2008-02-22T20:52:03Z</updated>
		
		<summary type="html">&lt;p&gt;Add mandelbrot alioth benchmark&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;This is a Gambit implementation of the [http://shootout.alioth.debian.org/gp4/benchmark.php?test=mandelbrot&amp;amp;lang=all mandelbrot] benchmark of the [[Programming language shootout|Computer Language Benchmarks Game]].&lt;br /&gt;
&lt;br /&gt;
==The program==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!gsi-script&lt;br /&gt;
&lt;br /&gt;
;; The Computer Language Benchmarks Game&lt;br /&gt;
;; http://shootout.alioth.debian.org/&lt;br /&gt;
&lt;br /&gt;
;; Derived by Bradley Lucier from the Ikarus variant&lt;br /&gt;
;; derived by Michael D. Adams from the Chicken variant by Anthony Borla&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(declare (standard-bindings)(extended-bindings)(block)(not safe))&lt;br /&gt;
&lt;br /&gt;
(define-macro (when test . body)&lt;br /&gt;
  `(if ,test&lt;br /&gt;
       (begin&lt;br /&gt;
	 ,@body)))&lt;br /&gt;
&lt;br /&gt;
;; -------------------------------&lt;br /&gt;
&lt;br /&gt;
(define *limit-sqr* 4.0)&lt;br /&gt;
&lt;br /&gt;
(define *iterations* 50)&lt;br /&gt;
&lt;br /&gt;
;; -------------------------------&lt;br /&gt;
&lt;br /&gt;
(define (mandelbrot iterations x frac2/n ci)&lt;br /&gt;
  (let ((cr (fl- (fl* (exact-&amp;gt;inexact x) frac2/n) 1.5))&lt;br /&gt;
	(z (f64vector 0. 0.)))&lt;br /&gt;
&lt;br /&gt;
    (define-macro (with-z . body)&lt;br /&gt;
      `(let ((zr (f64vector-ref z 0))&lt;br /&gt;
	     (zi (f64vector-ref z 1)))&lt;br /&gt;
	 ,@body))&lt;br /&gt;
&lt;br /&gt;
    (define (zr-set! val)&lt;br /&gt;
      (f64vector-set! z 0 val))&lt;br /&gt;
&lt;br /&gt;
    (define (zi-set! val)&lt;br /&gt;
      (f64vector-set! z 1 val))&lt;br /&gt;
    &lt;br /&gt;
    (let loop ((i 0))&lt;br /&gt;
      (cond ((fx&amp;gt; i iterations)&lt;br /&gt;
	     1)&lt;br /&gt;
	    ((with-z&lt;br /&gt;
	      (fl&amp;gt; (fl+ (fl* zr zr)&lt;br /&gt;
			(fl* zi zi))&lt;br /&gt;
		   *limit-sqr*))&lt;br /&gt;
	     0)&lt;br /&gt;
	    (else&lt;br /&gt;
	     (with-z&lt;br /&gt;
	      (zr-set! (fl+ (fl- (fl* zr zr)&lt;br /&gt;
				 (fl* zi zi))&lt;br /&gt;
			    cr))&lt;br /&gt;
	      (zi-set! (fl+ (fl* 2.0 zr zi)&lt;br /&gt;
			    ci))&lt;br /&gt;
	      (loop (fx+ 1 i))))))))&lt;br /&gt;
&lt;br /&gt;
;; -------------------------------&lt;br /&gt;
&lt;br /&gt;
(define (main arg)&lt;br /&gt;
  (let* ((n (string-&amp;gt;number arg))&lt;br /&gt;
	 (frac2/n (/ 2.0 n))&lt;br /&gt;
	 (out (current-output-port)))&lt;br /&gt;
    (display &amp;quot;P4&amp;quot;) (newline)&lt;br /&gt;
    (display n) (display &amp;quot; &amp;quot;) (display n) (newline)&lt;br /&gt;
    (let loop-y ((y 0))&lt;br /&gt;
      (when (&amp;lt; y n)&lt;br /&gt;
            (let ([ci (fl- (fl* (exact-&amp;gt;inexact y) frac2/n) 1.0)])&lt;br /&gt;
              (let loop-x ((x 0) (bitnum 0) (byteacc 0))&lt;br /&gt;
                (if (&amp;lt; x n)&lt;br /&gt;
                    (let ([bitnum (fx+ 1 bitnum)]&lt;br /&gt;
                          [byteacc (fx+ (fxarithmetic-shift-left byteacc 1)&lt;br /&gt;
                                        (mandelbrot *iterations* x frac2/n ci))])&lt;br /&gt;
                      (cond&lt;br /&gt;
                       [(= bitnum 8)&lt;br /&gt;
                        (write-u8 byteacc out)&lt;br /&gt;
                        (loop-x (fx+ 1 x) 0 0)]&lt;br /&gt;
                       [else (loop-x (fx+ 1 x) bitnum byteacc)]))&lt;br /&gt;
                    (begin&lt;br /&gt;
                      (when (positive? bitnum)&lt;br /&gt;
                            (write-u8 (fxarithmetic-shift-left byteacc (- 8 (fxand n #x7)))&lt;br /&gt;
				      out))&lt;br /&gt;
                      (loop-y (fx+ 1 y))))))))&lt;br /&gt;
    (force-output out)))&lt;br /&gt;
&lt;br /&gt;
;; -------------------------------&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==Compiling==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gsc mandelbrot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==Running==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
gsi mandelbrot -:m10000 3000 &amp;gt; output.pbm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here I give it a 10MB minimum heap.&lt;/div&gt;</summary>
		<author><name>Bjlucier</name></author>	</entry>

	</feed>