<turbo-stream action="append" target="posts_list"><template>    <div class="postbit" id="374789" data-post-id="374789">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="Schultzer" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/Schultzer/120/4339_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  Schultzer
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I was able to use José and <a class="mention" href="/u/bartotten" rel="nofollow">@BartOtten</a> example to remove most of the guards I had in my lexer <a href="https://github.com/elixir-dbvisor/sql/blob/main/lib/lexer.ex" class="inline-onebox" rel="noopener nofollow ugc">sql/lib/lexer.ex at main · elixir-dbvisor/sql · GitHub</a></p>
<p>guards is another issue for compilation and runtime performance. Highly recommend this approach if you’re doing performance work, guards is a big no no in that matter.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="374789" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/compiling-files-with-many-function-heads-is-very-slow-otp-26-issue/57105/52">Post #51</a>
	                </div>
	            </div>
              <div id="likers-container-374789" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="374789"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #51"></div>
  </section>
</div>
    <div class="postbit" id="374792" data-post-id="374792">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="BartOtten" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/BartOtten/120/25440_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  BartOtten
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>As I see it correctly you mean the <a href="https://forum.elixirforum.com/t/compiling-files-with-many-function-heads-is-very-slow-otp-26-issue/57105/25" rel="nofollow">Case-variant</a>, no?</p>
<p><a class="mention" href="/u/josevalim" rel="nofollow">@josevalim</a> thanks for the <code>hd</code> trick for quoted cases <img src="https://forum.elixirforum.com/images/emoji/apple/slight_smile.png?v=15" title=":slight_smile:" class="emoji" alt=":slight_smile:" loading="lazy" width="20" height="20"> Had <code>[unquote_splicing(clause_ast)]</code> in the back of my head but that did not work in this case (so gave up an wrote pure AST). Using <code>hd</code> is tight. Barely an inconvenience.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="374792" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/compiling-files-with-many-function-heads-is-very-slow-otp-26-issue/57105/53">Post #52</a>
	                </div>
	            </div>
              <div id="likers-container-374792" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="374792"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #52"></div>
  </section>
</div>
    <div class="postbit" id="374793" data-post-id="374793">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="Schultzer" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/Schultzer/120/4339_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  Schultzer
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Yes, case without guards</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="374793" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/compiling-files-with-many-function-heads-is-very-slow-otp-26-issue/57105/54">Post #53</a>
	                </div>
	            </div>
              <div id="likers-container-374793" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="374793"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #53"></div>
  </section>
</div>
    <div class="postbit" id="374817" data-post-id="374817">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="josevalim" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/josevalim/120/1787_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  josevalim
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Creator of Elixir</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="Schultzer" data-post="52" data-topic="57105">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/schultzer/48/4339_2.png" class="avatar"> Schultzer:</div>
<blockquote>
<p>guards is another issue for compilation and runtime performance. Highly recommend this approach if you’re doing performance work, guards is a big no no in that matter.</p>
</blockquote>
</aside>
<p>I generally disagree with this conclusion but I am glad to be proven wrong if there are benchmarks proving so.</p>
<p>The issue in <a class="mention" href="/u/bartotten" rel="nofollow">@BartOtten</a> ‘s example was not the guards, simply the amount of code of generated. If you reduce the amount of code you generate, be it in the form of guards, function calls, data structures, it will likely speed up compiler and runtime. So there is a chance you are reducing the amount of guards, which leads to reduced lines of code, and that’s what is actually improving, it is not about the guards themselves.</p>
<p>Benchmarks are always tricky and it is very easy to take wrong conclusions.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="374817" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/compiling-files-with-many-function-heads-is-very-slow-otp-26-issue/57105/55">Post #54</a>
	                </div>
	            </div>
              <div id="likers-container-374817" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="374817"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #54"></div>
  </section>
</div>
    <div class="postbit" id="374819" data-post-id="374819">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="BartOtten" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/BartOtten/120/25440_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  BartOtten
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote group-livebook_core_team" data-username="josevalim" data-post="55" data-topic="57105">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/josevalim/48/1787_2.png" class="avatar"> josevalim:</div>
<blockquote>
<p>The issue in <a class="mention" href="/u/bartotten" rel="nofollow">@BartOtten</a> ‘s example was not the guards, simply the amount of code of generated.</p>
</blockquote>
</aside>
<p>This is true. I only tried to demonstrate that (macro generating) many function heads with <em>the same</em> guards  could be optimized by wrapping <em>unguarded case clauses</em> in a single <em>guarded function head</em>. It’s simply less code/AST, less to check.</p>
<p>The reason why I called the case-variant “immune to adding guards”, is because the amount of guards <em>does not multiply</em> in that example, where in the head-example it <em>does multiply</em> by the amount of heads. It has <em>nothing</em> to do with the guard construct itself.</p>
<p><strong>‘Bloated’ AST function heads</strong><br>
In this example the <em>struct</em> is repeated over and over.</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">def foo(%Struct{foo: "bar"}), do: :bartender
def foo(%Struct{foo: "zip"}), do: :zippy
def foo(%Struct{foo: "zelo"}), do: :zarika
(and then 1000 more)
</code></pre>
<p>Versus</p>
<p><strong>Reduced AST case variant</strong><br>
There is less code as some constructs (def, struct) are not repeated a 1000 times.</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">def foo(%Struct{foo: my_var}) do
  case my_var do
   "bar" -&gt; :bartender
   "zip" -&gt; :zippy
   "zelo" -&gt; :zarika
    (and then 1000 more)
  end
end
</code></pre>
<p><strong>Reduced AST function heads</strong><br>
This also avoids repetition and has reduced AST.</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">def foo(%Struct{foo: my_var}), do: do_foo(my_var)

defp do_foo("bar"), do: :bartender
defp do_foo("zip"), do: :zippy
defp do_foo("zelo"), do: :zarika
 (and then 1000 more)
</code></pre>
<p>This also goes for all other things where you can eliminate AST by simply writing/generating code differently.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="374819" data-batch-url="/posts/batch_likers">
                        5
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/compiling-files-with-many-function-heads-is-very-slow-otp-26-issue/57105/56">Post #55</a>
	                </div>
	            </div>
              <div id="likers-container-374819" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="374819"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #55"></div>
  </section>
</div>
    <div class="postbit" id="374820" data-post-id="374820">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="Schultzer" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/Schultzer/120/4339_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  Schultzer
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I already posted a benchmark showcasing guards are roughly 2.5x slower then pattern matching <a href="https://forum.elixirforum.com/t/compiling-files-with-many-function-heads-is-very-slow-otp-26-issue/57105/44" class="inline-onebox" rel="nofollow">Compiling files with many function heads is very slow(OTP 26 issue?) - #44 by Schultzer</a> and here is the code <a href="https://forum.elixirforum.com/t/compiling-files-with-many-function-heads-is-very-slow-otp-26-issue/57105/51" class="inline-onebox" rel="nofollow">Compiling files with many function heads is very slow(OTP 26 issue?) - #51 by Schultzer</a></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="374820" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/compiling-files-with-many-function-heads-is-very-slow-otp-26-issue/57105/57">Post #56</a>
	                </div>
	            </div>
              <div id="likers-container-374820" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="374820"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #56"></div>
  </section>
</div>
    <div class="postbit" id="374828" data-post-id="374828">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="josevalim" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/josevalim/120/1787_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  josevalim
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Creator of Elixir</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I did not see code with no guards (you mentioned you did change, but no reproducible examples afaik) and the version you posted on the Erlang Forums simply added a body to the clause. No guards involved. And that case the difference in performance was related to the amount of generated code. We can continue the discussion here: <a href="https://erlangforums.com/t/why-does-the-efficiency-guide-not-mention-how-expensive-exported-functions-can-be-for-compilation-times/5077/22" class="inline-onebox" rel="nofollow">Why does the efficiency guide not mention how expensive exported functions can be for compilation times - #22 by Schultzer - Questions / Help - Erlang Programming Language Forum - Erlang Forums</a></p>
<p>In any case, <a class="mention" href="/u/bartotten" rel="nofollow">@BartOtten</a> nailed the root cause in his last comment above.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="374828" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/compiling-files-with-many-function-heads-is-very-slow-otp-26-issue/57105/58">Post #57</a>
	                </div>
	            </div>
              <div id="likers-container-374828" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="374828"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #57"></div>
  </section>
</div>
    <div class="postbit" id="374833" data-post-id="374833">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="Schultzer" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/Schultzer/120/4339_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  Schultzer
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>The code I posted is benchmarking a function using case statement against a function using a guard. And pattern matching outperform guards.</p>
<p>The issue in the ErlangForum is about how to generate this case statement efficiently for the compiler when the return is a function call.</p>
<p>If that is because the guard function is using utf8 is beside the point as the way the function is written makes it slower by 2.5x</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">defmodule Test do
  require Unicode.Set
  case_ast =
    for c &lt;- Unicode.Set.to_pattern!("[[:Lu:], [:Ll:], [:Lt:], [:Lm:], [:Lo:], [:Nl:], [:Mn:], [:Mc:], [:Nd:], [:Pc:], [:Cf:]]") do
      hd(
        quote do
          &lt;&lt;unquote(c), _::binary&gt;&gt; -&gt; true
        end
      )
    end ++ quote do
      _ -&gt; false
    end

  def case_fn(binary) do
    case binary do
      unquote(case_ast)
   end end

  def guard_fn(&lt;&lt;b::utf8, _::binary&gt;&gt;) when Unicode.Set.match?(b, "[[:Lu:], [:Ll:], [:Lt:], [:Lm:], [:Lo:], [:Nl:], [:Mn:], [:Mc:], [:Nd:], [:Pc:], [:Cf:]]"), do: true
  def guard_fn(_binary), do: false
end
</code></pre>
<pre data-code-wrap="elixir"><code class="lang-elixir">➜  sql git:(main) ✗ mix sql.bench
Operating System: macOS
CPU Information: Apple M1 Max
Number of Available Cores: 10
Available memory: 64 GB
Elixir 1.20.0-dev
Erlang 28.1
JIT enabled: true

Benchmark suite executing with the following configuration:
warmup: 2 s
time: 5 s
memory time: 2 s
reduction time: 2 s
parallel: 1
inputs: 1..100_000
Estimated total run time: 22 s

Measured function call overhead as: 0 ns
Benchmarking case with input 1..100_000 ...
Benchmarking guard with input 1..100_000 ...
Calculating statistics...
Formatting results...

##### With input 1..100_000 #####
Name           ips        average  deviation         median         99th %
case        15.07 M       66.35 ns ±42238.21%          42 ns          42 ns
guard        6.14 M      162.76 ns ±15740.33%         125 ns         167 ns

Comparison:
case        15.07 M
guard        6.14 M - 2.45x slower +96.41 ns

Memory usage statistics:

Name    Memory usage
case             40 B
guard            40 B - 1.00x memory usage +0 B

**All measurements for memory usage were the same**

Reduction count statistics:

Name Reduction count
case                2
guard               2 - 1.00x reduction count +0


</code></pre> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="374833" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/compiling-files-with-many-function-heads-is-very-slow-otp-26-issue/57105/59">Post #58</a>
	                </div>
	            </div>
              <div id="likers-container-374833" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="374833"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #58"></div>
  </section>
</div>
    <div class="postbit" id="374834" data-post-id="374834">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="BartOtten" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/BartOtten/120/25440_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  BartOtten
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>So this thread was missing the “single guarded delegating function” versus “single guarded function with unguarded case clauses”  benchmark results. So for completeness:</p>
<p>OPTIMIZED MULTI HEAD: <strong>3519.502 ms</strong></p>
<pre data-code-wrap="elixir"><code class="lang-elixir">defmodule Heads.A do
  def foo(x,y) when is_integer(x) and is_integer(y), do: do_foo(x,y)

  for i &lt;- 1..10000 do
    def do_foo(x = unquote(i), _y = unquote(i)), do: unquote(i)
  end
end
</code></pre>
<p>Versus</p>
<p>OPTIMIZED CASE: <strong>3527.108 ms</strong></p>
<pre data-code-wrap="elixir"><code class="lang-elixir">defmodule Case.A do
  case_ast =
    for i &lt;- 1..10000 do
      hd(
        quote do
          {x = unquote(i), _y = unquote(i)}  -&gt; unquote(i)
        end
      )
    end

  def foo(x, y) when is_integer(x) and is_integer(y) do
    case {x, y} do
      unquote(case_ast)
    end
  end
end

</code></pre>
<p>The compilation time difference is insignificant and switching in favor between the two methods. So you might think both are equal. Well, no…</p>
<p>Using HEAD you get 10000 reports that “variable <code>x</code> is unused” and should probably be underscored, while the unused variable is not detected when using CASE. If you care about clean code, the OPTIMIZED MULTI HEAD is the better option.</p>
<p><sup class="footnote-ref"><a href="#footnote-374834-1" id="footnote-ref-374834-1" rel="nofollow">[1]</a></sup> disclaimer: in this case, don’t fall for premature optimization, always bench your own use case if you really want to know, unless José tells you otherwise</p>
<hr class="footnotes-sep">

<ol class="footnotes-list">
<li id="footnote-374834-1" class="footnote-item"><p>Footnotes <a href="#footnote-ref-374834-1" class="footnote-backref" rel="nofollow">↩︎</a></p>
</li>
</ol> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="374834" data-batch-url="/posts/batch_likers">
                        2
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/compiling-files-with-many-function-heads-is-very-slow-otp-26-issue/57105/60">Post #59</a>
	                </div>
	            </div>
              <div id="likers-container-374834" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="374834"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #59"></div>
  </section>
</div>
    <div class="postbit" id="374881" data-post-id="374881">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="BartOtten" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/BartOtten/120/25440_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  BartOtten
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>These is alsno no difference between using a lot of <code>def</code> versus a lot of <code>defp</code>. These timings are for 50.000 (+1 public) heads.</p>
<p>test_defp.ex compiled in 14098.673 ms<br>
test_def.ex compiled in 14061.436 ms</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="374881" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/compiling-files-with-many-function-heads-is-very-slow-otp-26-issue/57105/61">Post #60</a>
	                </div>
	            </div>
              <div id="likers-container-374881" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="374881"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #60"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <a class="load-more-button" data-turbo-stream="true" href="/topics/57105/load_more?page=7">Load more posts (9 remaining)</a>
</div></template></turbo-stream>