<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html xmlns:fn="http://www.w3.org/2005/02/xpath-functions"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <link rel="stylesheet" href="../otp_doc.css" type="text/css"> <title>Erlang -- Efficiency Guide </title> </head> <body bgcolor="white" text="#000000" link="#0000ff" vlink="#ff00ff" alink="#ff0000"><div id="container"> <script id="js" type="text/javascript" language="JavaScript" src="../js/flipmenu/flipmenu.js"></script><script id="js2" type="text/javascript" src="../js/erlresolvelinks.js"></script><script language="JavaScript" type="text/javascript"> <!-- function getWinHeight() { var myHeight = 0; if( typeof( window.innerHeight ) == 'number' ) { //Non-IE myHeight = window.innerHeight; } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) { //IE 6+ in 'standards compliant mode' myHeight = document.documentElement.clientHeight; } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) { //IE 4 compatible myHeight = document.body.clientHeight; } return myHeight; } function setscrollpos() { var objf=document.getElementById('loadscrollpos'); document.getElementById("leftnav").scrollTop = objf.offsetTop - getWinHeight()/2; } function addEvent(obj, evType, fn){ if (obj.addEventListener){ obj.addEventListener(evType, fn, true); return true; } else if (obj.attachEvent){ var r = obj.attachEvent("on"+evType, fn); return r; } else { return false; } } addEvent(window, 'load', setscrollpos); //--></script><div id="leftnav"><div class="innertube"> <img alt="Erlang logo" src="../erlang-logo.png"><br><small><a href="users_guide.html">User's Guide</a><br><a href="../pdf/otp-system-documentation-5.7.5.pdf">PDF</a><br><a href="../index.html">Top</a></small><p><strong>Efficiency Guide</strong><br><strong>User's Guide</strong><br><small>Version 5.7.5</small></p> <br><a href="javascript:openAllFlips()">Expand All</a><br><a href="javascript:closeAllFlips()">Contract All</a><p><small><strong>Chapters</strong></small></p> <ul class="flipMenu" imagepath="../js/flipmenu"> <li id="no" title="Introduction" expanded="false">Introduction<ul> <li><a href="introduction.html"> Top of chapter </a></li> <li title="Purpose"><a href="introduction.html#id2258668">Purpose</a></li> <li title="Prerequisites"><a href="introduction.html#id2259835">Prerequisites</a></li> </ul> </li> <li id="no" title="The Eight Myths of Erlang Performance" expanded="false">The Eight Myths of Erlang Performance<ul> <li><a href="myths.html"> Top of chapter </a></li> <li title="Myth: Funs are slow"><a href="myths.html#id2252829">Myth: Funs are slow</a></li> <li title="Myth: List comprehensions are slow"><a href="myths.html#id2255920">Myth: List comprehensions are slow</a></li> <li title="Myth: Tail-recursive functions are MUCH faster than recursive functions"><a href="myths.html#id2251841">Myth: Tail-recursive functions are MUCH faster than recursive functions</a></li> <li title="Myth: '++' is always bad"><a href="myths.html#id2253656">Myth: '++' is always bad</a></li> <li title="Myth: Strings are slow"><a href="myths.html#id2259534">Myth: Strings are slow</a></li> <li title="Myth: Repairing a Dets file is very slow"><a href="myths.html#id2252646">Myth: Repairing a Dets file is very slow</a></li> <li title="Myth: BEAM is a stack-based byte-code virtual machine (and therefore slow)"><a href="myths.html#id2252903">Myth: BEAM is a stack-based byte-code virtual machine (and therefore slow)</a></li> <li title="Myth: Use '_' to speed up your program when a variable is not used"><a href="myths.html#id2254092">Myth: Use '_' to speed up your program when a variable is not used</a></li> </ul> </li> <li id="no" title="Common Caveats" expanded="false">Common Caveats<ul> <li><a href="commoncaveats.html"> Top of chapter </a></li> <li title="The regexp module"><a href="commoncaveats.html#id2254130">The regexp module</a></li> <li title="The timer module"><a href="commoncaveats.html#id2252598">The timer module</a></li> <li title="list_to_atom/1"><a href="commoncaveats.html#id2255906">list_to_atom/1</a></li> <li title="length/1"><a href="commoncaveats.html#id2252967">length/1</a></li> <li title="setelement/3"><a href="commoncaveats.html#id2262040">setelement/3</a></li> <li title="size/1"><a href="commoncaveats.html#id2253013">size/1</a></li> <li title="split_binary/2"><a href="commoncaveats.html#id2259425">split_binary/2</a></li> <li title="The '--' operator"><a href="commoncaveats.html#id2259471">The '--' operator</a></li> </ul> </li> <li id="no" title="Constructing and matching binaries" expanded="false">Constructing and matching binaries<ul> <li><a href="binaryhandling.html"> Top of chapter </a></li> <li title="How binaries are implemented"><a href="binaryhandling.html#id2257812">How binaries are implemented</a></li> <li title="Constructing binaries"><a href="binaryhandling.html#id2251922">Constructing binaries</a></li> <li title="Matching binaries"><a href="binaryhandling.html#id2264031">Matching binaries</a></li> </ul> </li> <li id="no" title="List handling" expanded="false">List handling<ul> <li><a href="listHandling.html"> Top of chapter </a></li> <li title="Creating a list"><a href="listHandling.html#id2260919">Creating a list</a></li> <li title="List comprehensions"><a href="listHandling.html#id2261027">List comprehensions</a></li> <li title="Deep and flat lists"><a href="listHandling.html#id2261105">Deep and flat lists</a></li> <li title="Why you should not worry about recursive lists functions"><a href="listHandling.html#id2261258">Why you should not worry about recursive lists functions</a></li> </ul> </li> <li id="no" title="Functions" expanded="false">Functions<ul> <li><a href="functions.html"> Top of chapter </a></li> <li title="Pattern matching"><a href="functions.html#id2261398">Pattern matching</a></li> <li title="Function Calls "><a href="functions.html#id2261646">Function Calls </a></li> <li title="Memory usage in recursion"><a href="functions.html#id2261797">Memory usage in recursion</a></li> </ul> </li> <li id="no" title="Tables and databases" expanded="false">Tables and databases<ul> <li><a href="tablesDatabases.html"> Top of chapter </a></li> <li title="Ets, Dets and Mnesia"><a href="tablesDatabases.html#id2261897">Ets, Dets and Mnesia</a></li> <li title="Ets specific"><a href="tablesDatabases.html#id2264895">Ets specific</a></li> <li title="Mnesia specific"><a href="tablesDatabases.html#id2265012">Mnesia specific</a></li> </ul> </li> <li id="no" title="Processes" expanded="false">Processes<ul> <li><a href="processes.html"> Top of chapter </a></li> <li title="Creation of an Erlang process"><a href="processes.html#id2265135">Creation of an Erlang process</a></li> <li title="Process messages"><a href="processes.html#id2265309">Process messages</a></li> <li title="The SMP emulator"><a href="processes.html#id2265527">The SMP emulator</a></li> </ul> </li> <li id="no" title="Drivers" expanded="false">Drivers<ul> <li><a href="drivers.html"> Top of chapter </a></li> <li title="Drivers and concurrency"><a href="drivers.html#id2265646">Drivers and concurrency</a></li> <li title="Avoiding copying of binaries when calling a driver"><a href="drivers.html#id2265697">Avoiding copying of binaries when calling a driver</a></li> <li title="Returning small binaries from a driver"><a href="drivers.html#id2265773">Returning small binaries from a driver</a></li> <li title="Returning big binaries without copying from a driver"><a href="drivers.html#id2265814">Returning big binaries without copying from a driver</a></li> </ul> </li> <li id="no" title="Advanced" expanded="false">Advanced<ul> <li><a href="advanced.html"> Top of chapter </a></li> <li title="Memory"><a href="advanced.html#id2265969">Memory</a></li> <li title="System limits"><a href="advanced.html#id2266338">System limits</a></li> </ul> </li> <li id="no" title="Profiling" expanded="false">Profiling<ul> <li><a href="profiling.html"> Top of chapter </a></li> <li title="Do not guess about performance - profile"><a href="profiling.html#id2266674">Do not guess about performance - profile</a></li> <li title="Big systems"><a href="profiling.html#id2266757">Big systems</a></li> <li title="What to look for"><a href="profiling.html#id2266782">What to look for</a></li> <li title="Tools"><a href="profiling.html#id2266849">Tools</a></li> <li title="Benchmarking"><a href="profiling.html#id2267343">Benchmarking</a></li> </ul> </li> </ul> </div></div> <div id="content"> <div class="innertube"> <div class="frontpage"></div> <center><h1>Efficiency Guide User's Guide</h1></center> <center><h4>Version 5.7.5</h4></center> <center><h4>February 22 2010</h4></center> </div> <div class="footer"> <hr> <p>Copyright © 2001-2010 Ericsson AB. All Rights Reserved.</p> </div> </div> </div></body> </html>