Updated latest article

This commit is contained in:
Yann Esposito (Yogsototh) 2012-06-18 19:41:43 +02:00
parent 8c5d78fb09
commit 76f5bc898c
8 changed files with 609 additions and 593 deletions

View file

@ -114,7 +114,9 @@ import Data.IORef
</code>
</div>
For efficiency reason, I will not use the default Haskell `Complex` data type.
For efficiency reason[^010001], I will not use the default Haskell `Complex` data type.
[^010001]: I tried `Complex Double`, `Complex Float`, this current data type with `Double` and the actual version `Float`. For rendering a 1024x1024 Mandelbrot set it takes `Complex Double` about 6.8s, for `Complex Float` about 5.1s, for the actual version with `Double` and `Float` it takes about `1.6` sec. See these sources for testing yourself: [https://gist.github.com/2945043](https://gist.github.com/2945043). I haven't tried to use unpacked data type because it looks weird in a tutorial. But I might try it in a sequel.
<div class="codehighlight">
<code class="haskell">

View file

@ -114,7 +114,9 @@ import Data.IORef
</code>
</div>
For efficiency reason, I will not use the default Haskell `Complex` data type.
For efficiency reason[^010001], I will not use the default Haskell `Complex` data type.
[^010001]: I tried `Complex Double`, `Complex Float`, this current data type with `Double` and the actual version `Float`. For rendering a 1024x1024 Mandelbrot set it takes `Complex Double` about 6.8s, for `Complex Float` about 5.1s, for the actual version with `Double` and `Float` it takes about `1.6` sec. See these sources for testing yourself: [https://gist.github.com/2945043](https://gist.github.com/2945043). I haven't tried to use unpacked data type because it looks weird in a tutorial. But I might try it in a sequel.
<div class="codehighlight">
<code class="haskell">

View file

@ -122,7 +122,9 @@ import Data.IORef
</code>
</div>
For efficiency reason, I will not use the default Haskell `Complex` data type.
For efficiency reason[^010001], I will not use the default Haskell `Complex` data type.
[^010001]: I tried `Complex Double`, `Complex Float`, this current data type with `Double` and the actual version `Float`. For rendering a 1024x1024 Mandelbrot set it takes `Complex Double` about 6.8s, for `Complex Float` about 5.1s, for the actual version with `Double` and `Float` it takes about `1.6` sec. See these sources for testing yourself: [https://gist.github.com/2945043](https://gist.github.com/2945043). I haven't tried to use unpacked data type because it looks weird in a tutorial. But I might try it in a sequel.
<div class="codehighlight">
<code class="haskell">

View file

@ -18,7 +18,9 @@ And the second part more focused on OpenGL and content.
> import Graphics.UI.GLUT
> import Data.IORef
For efficiency reason, I will not use the default Haskell `Complex` data type.
For efficiency reason[^010001], I will not use the default Haskell `Complex` data type.
[^010001]: I tried `Complex Double`, `Complex Float`, this current data type with `Double` and the actual version `Float`. For rendering a 1024x1024 Mandelbrot set it takes `Complex Double` about 6.8s, for `Complex Float` about 5.1s, for the actual version with `Double` and `Float` it takes about `1.6` sec. See these sources for testing yourself: [https://gist.github.com/2945043](https://gist.github.com/2945043). I haven't tried to use unpacked data type because it looks weird in a tutorial. But I might try it in a sequel.
> data Complex = C (Float,Float) deriving (Show,Eq)

View file

@ -177,7 +177,7 @@ import Data.IORef
</div>
<p>For efficiency reason, I will not use the default Haskell <code>Complex</code> data type.</p>
<p>For efficiency reason<sup id="fnref:010001"><a href="#fn:010001" rel="footnote">3</a></sup>, I will not use the default Haskell <code>Complex</code> data type.</p>
<div class="codehighlight">
@ -1934,6 +1934,9 @@ O(n².log(n)) to O(n³).</p>
but, each time I do a copy/paste, I feel something is wrong.
I believe this concern can be generalized to the lack of namespace in Haskell.<a href="#fnref:011" rel="reference">&#8617;</a></p>
</li>
<li id="fn:010001">
<p>I tried <code>Complex Double</code>, <code>Complex Float</code>, this current data type with <code>Double</code> and the actual version <code>Float</code>. For rendering a 1024x1024 Mandelbrot set it takes <code>Complex Double</code> about 6.8s, for <code>Complex Float</code> about 5.1s, for the actual version with <code>Double</code> and <code>Float</code> it takes about <code>1.6</code> sec. See these sources for testing yourself: <a href="https://gist.github.com/2945043">https://gist.github.com/2945043</a>. I haven&rsquo;t tried to use unpacked data type because it looks weird in a tutorial. But I might try it in a sequel.<a href="#fnref:010001" rel="reference">&#8617;</a></p>
</li>
</ol>
</div>

View file

@ -18,7 +18,9 @@ And the second part more focused on OpenGL and content.
> import Graphics.UI.GLUT
> import Data.IORef
For efficiency reason, I will not use the default Haskell `Complex` data type.
For efficiency reason[^010001], I will not use the default Haskell `Complex` data type.
[^010001]: I tried `Complex Double`, `Complex Float`, this current data type with `Double` and the actual version `Float`. For rendering a 1024x1024 Mandelbrot set it takes `Complex Double` about 6.8s, for `Complex Float` about 5.1s, for the actual version with `Double` and `Float` it takes about `1.6` sec. See these sources for testing yourself: [https://gist.github.com/2945043](https://gist.github.com/2945043). I haven't tried to use unpacked data type because it looks weird in a tutorial. But I might try it in a sequel.
> data Complex = C (Float,Float) deriving (Show,Eq)

View file

@ -177,7 +177,7 @@ import Data.IORef
</div>
<p>For efficiency reason, I will not use the default Haskell <code>Complex</code> data type.</p>
<p>For efficiency reason<sup id="fnref:010001"><a href="#fn:010001" rel="footnote">3</a></sup>, I will not use the default Haskell <code>Complex</code> data type.</p>
<div class="codehighlight">
@ -1934,6 +1934,9 @@ O(n².log(n)) to O(n³).</p>
but, each time I do a copy/paste, I feel something is wrong.
I believe this concern can be generalized to the lack of namespace in Haskell.<a href="#fnref:011" rel="reference">&#8617;</a></p>
</li>
<li id="fn:010001">
<p>I tried <code>Complex Double</code>, <code>Complex Float</code>, this current data type with <code>Double</code> and the actual version <code>Float</code>. For rendering a 1024x1024 Mandelbrot set it takes <code>Complex Double</code> about 6.8s, for <code>Complex Float</code> about 5.1s, for the actual version with <code>Double</code> and <code>Float</code> it takes about <code>1.6</code> sec. See these sources for testing yourself: <a href="https://gist.github.com/2945043">https://gist.github.com/2945043</a>. I haven&rsquo;t tried to use unpacked data type because it looks weird in a tutorial. But I might try it in a sequel.<a href="#fnref:010001" rel="reference">&#8617;</a></p>
</li>
</ol>
</div>

File diff suppressed because it is too large Load diff