Difference between revisions of "Talk:Performance/Strictness"

From HaskellWiki
Jump to navigation Jump to search
(http://lakinkea.strefa.pl/comment-1398.htm)
(removed)
 
(7 intermediate revisions by 4 users not shown)
Line 1: Line 1:
  +
I removed the following:
[outdoor bar furniture|http://lakinkea.strefa.pl/comment-1398.htm] [[http://lakinkea.strefa.pl/comment-1398.htm outdoor bar furniture]] [http://lakinkea.strefa.pl/comment-1398.htm|outdoor bar furniture] ((http://lakinkea.strefa.pl/comment-1398.htm outdoor bar furniture)) [[http://lakinkea.strefa.pl/comment-1398.htm | outdoor bar furniture]] "outdoor bar furniture":http://lakinkea.strefa.pl/comment-1398.htm [movie piracy|http://woelgin.interfree.it/topic-387.html] [[http://woelgin.interfree.it/topic-387.html movie piracy]] [http://woelgin.interfree.it/topic-387.html|movie piracy] ((http://woelgin.interfree.it/topic-387.html movie piracy)) [[http://woelgin.interfree.it/topic-387.html | movie piracy]] "movie piracy":http://woelgin.interfree.it/topic-387.html [rummy royale|http://vastack.interfree.it/20081122-rummy-royale.html] [[http://vastack.interfree.it/20081122-rummy-royale.html rummy royale]] [http://vastack.interfree.it/20081122-rummy-royale.html|rummy royale] ((http://vastack.interfree.it/20081122-rummy-royale.html rummy royale)) [[http://vastack.interfree.it/20081122-rummy-royale.html | rummy royale]] "rummy royale":http://vastack.interfree.it/20081122-rummy-royale.html [college stud|http://haschucka.interfree.it/news-college-stud-20081122.html] [[http://haschucka.interfree.it/news-college-stud-20081122.html college stud]] [http://haschucka.interfree.it/news-college-stud-20081122.html|college stud] ((http://haschucka.interfree.it/news-college-stud-20081122.html college stud)) [[http://haschucka.interfree.it/news-college-stud-20081122.html | college stud]] "college stud":http://haschucka.interfree.it/news-college-stud-20081122.html [1956 ford|http://anabascom.interfree.it/1044544690/] [[http://anabascom.interfree.it/1044544690/ 1956 ford]] [http://anabascom.interfree.it/1044544690/|1956 ford] ((http://anabascom.interfree.it/1044544690/ 1956 ford)) [[http://anabascom.interfree.it/1044544690/ | 1956 ford]] "1956 ford":http://anabascom.interfree.it/1044544690/
 
  +
<blockquote>NB. do not do this if the expression on the right of $! is a variable - that just wastes effort, because it does not eliminate a suspension. The only reason to do this would be if you were eliminating a space leak.</blockquote>
[nate mcmillan|http://anabascom.interfree.it/1070682128/] [[http://anabascom.interfree.it/1070682128/ nate mcmillan]] [http://anabascom.interfree.it/1070682128/|nate mcmillan] ((http://anabascom.interfree.it/1070682128/ nate mcmillan)) [[http://anabascom.interfree.it/1070682128/ | nate mcmillan]] "nate mcmillan":http://anabascom.interfree.it/1070682128/ [illinois hunting and fishing license|http://oufokme.ifrance.com/eltfavice1257.htm] [[http://oufokme.ifrance.com/eltfavice1257.htm illinois hunting and fishing license]] [http://oufokme.ifrance.com/eltfavice1257.htm|illinois hunting and fishing license] ((http://oufokme.ifrance.com/eltfavice1257.htm illinois hunting and fishing license)) [[http://oufokme.ifrance.com/eltfavice1257.htm | illinois hunting and fishing license]] "illinois hunting and fishing license":http://oufokme.ifrance.com/eltfavice1257.htm [adipex no script needed|http://vastack.interfree.it/20081127-adipex-no-script.html] [[http://vastack.interfree.it/20081127-adipex-no-script.html adipex no script needed]] [http://vastack.interfree.it/20081127-adipex-no-script.html|adipex no script needed] ((http://vastack.interfree.it/20081127-adipex-no-script.html adipex no script needed)) [[http://vastack.interfree.it/20081127-adipex-no-script.html | adipex no script needed]] "adipex no script needed":http://vastack.interfree.it/20081127-adipex-no-script.html [three rivers auction|http://liendar.ifrance.com/page905.html] [[http://liendar.ifrance.com/page905.html three rivers auction]] [http://liendar.ifrance.com/page905.html|three rivers auction] ((http://liendar.ifrance.com/page905.html three rivers auction)) [[http://liendar.ifrance.com/page905.html | three rivers auction]] "three rivers auction":http://liendar.ifrance.com/page905.html [ostroms drug|http://coflemin.interfree.it/topic-1028.html] [[http://coflemin.interfree.it/topic-1028.html ostroms drug]] [http://coflemin.interfree.it/topic-1028.html|ostroms drug] ((http://coflemin.interfree.it/topic-1028.html ostroms drug)) [[http://coflemin.interfree.it/topic-1028.html | ostroms drug]] "ostroms drug":http://coflemin.interfree.it/topic-1028.html
 
  +
because
  +
<pre-haskell>
  +
test = let
  +
x = undefined
  +
in (const 0) $! x
  +
</pre-haskell>
  +
yields exception and substituting ($) for ($!) yields 0. So ($!) does eliminate a suspension.
  +
--[[User:Beroal|beroal]] 16:58, 16 June 2010 (UTC)

Latest revision as of 16:58, 16 June 2010

I removed the following:

NB. do not do this if the expression on the right of $! is a variable - that just wastes effort, because it does not eliminate a suspension. The only reason to do this would be if you were eliminating a space leak.

because <pre-haskell> test = let

 x = undefined
 in (const 0) $! x

</pre-haskell> yields exception and substituting ($) for ($!) yields 0. So ($!) does eliminate a suspension. --beroal 16:58, 16 June 2010 (UTC)