moonpool/dev/ocaml/Inlining_cost/index.html
2023-08-28 17:11:38 +00:00

7 lines
No EOL
5.1 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Inlining_cost (ocaml.Inlining_cost)</title><link rel="stylesheet" href="../../_odoc-theme/odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 2.2.1"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> <a href="../index.html">ocaml</a> &#x00BB; Inlining_cost</nav><header class="odoc-preamble"><h1>Module <code><span>Inlining_cost</span></code></h1><p>Measurement of the cost (including cost in space) of Flambda terms in the context of inlining.</p></header><div class="odoc-content"><div class="odoc-spec"><div class="spec module anchored" id="module-Threshold"><a href="#module-Threshold" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Threshold/index.html">Threshold</a></span><span> : <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-can_inline"><a href="#val-can_inline" class="anchor"></a><code><span><span class="keyword">val</span> can_inline : <span><a href="../Flambda/index.html#type-t">Flambda.t</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="Threshold/index.html#type-t">Threshold.t</a> <span class="arrow">&#45;&gt;</span></span> <span>bonus:int <span class="arrow">&#45;&gt;</span></span> bool</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-can_try_inlining"><a href="#val-can_try_inlining" class="anchor"></a><code><span><span class="keyword">val</span> can_try_inlining :
<span><a href="../Flambda/index.html#type-t">Flambda.t</a> <span class="arrow">&#45;&gt;</span></span>
<span><a href="Threshold/index.html#type-t">Threshold.t</a> <span class="arrow">&#45;&gt;</span></span>
<span>number_of_arguments:int <span class="arrow">&#45;&gt;</span></span>
<span>size_from_approximation:<span>int option</span> <span class="arrow">&#45;&gt;</span></span>
<a href="Threshold/index.html#type-t">Threshold.t</a></span></code></div></div><div class="odoc-spec"><div class="spec module anchored" id="module-Benefit"><a href="#module-Benefit" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Benefit/index.html">Benefit</a></span><span> : <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div></div><div class="odoc-spec"><div class="spec module anchored" id="module-Whether_sufficient_benefit"><a href="#module-Whether_sufficient_benefit" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Whether_sufficient_benefit/index.html">Whether_sufficient_benefit</a></span><span> : <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-scale_inline_threshold_by"><a href="#val-scale_inline_threshold_by" class="anchor"></a><code><span><span class="keyword">val</span> scale_inline_threshold_by : int</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-default_toplevel_multiplier"><a href="#val-default_toplevel_multiplier" class="anchor"></a><code><span><span class="keyword">val</span> default_toplevel_multiplier : int</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-direct_call_size"><a href="#val-direct_call_size" class="anchor"></a><code><span><span class="keyword">val</span> direct_call_size : int</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-maximum_interesting_size_of_function_body"><a href="#val-maximum_interesting_size_of_function_body" class="anchor"></a><code><span><span class="keyword">val</span> maximum_interesting_size_of_function_body : <span>int <span class="arrow">&#45;&gt;</span></span> int</span></code></div><div class="spec-doc"><p>If a function body exceeds this size, we can make a fast decision not to inline it (see <code>Inlining_decision</code>).</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-lambda_smaller'"><a href="#val-lambda_smaller'" class="anchor"></a><code><span><span class="keyword">val</span> lambda_smaller' : <span><a href="../Flambda/index.html#type-expr">Flambda.expr</a> <span class="arrow">&#45;&gt;</span></span> <span>than:int <span class="arrow">&#45;&gt;</span></span> <span>int option</span></span></code></div><div class="spec-doc"><p>Measure the given expression to determine whether its size is at or below the given threshold. <code>None</code> is returned if it is too big; otherwise <code>Some</code> is returned with the measured size.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-lambda_size"><a href="#val-lambda_size" class="anchor"></a><code><span><span class="keyword">val</span> lambda_size : <span><a href="../Flambda/index.html#type-expr">Flambda.expr</a> <span class="arrow">&#45;&gt;</span></span> int</span></code></div></div></div></body></html>