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


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="sribe" data-post="30" data-topic="18417">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/s/439d5e/48.png" class="avatar"> sribe:</div>
<blockquote>
<p>Because generally on CPU calculations the BEAM is substantially slower, but it is blazing fast on moving IO around, and superb at doing lots of that in parallel.</p>
</blockquote>
</aside>
<p>That’s a really good takeaway and it has been my feeling (backed with measured results) as well.</p>
<p>Not sure why people even come to dynamic languages expecting miracles of performance. Maybe they don’t realise that a lot of stuff in Python, JS and Ruby uses C libraries?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="166096" 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/understanding-elixir-phoenix-performance/18417/32">Post #31</a>
	                </div>
	            </div>
              <div id="likers-container-166096" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="166096"
                     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 #31"></div>
  </section>
</div>
    <div class="postbit" id="166136" data-post-id="166136">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="sribe" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  sribe
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="dimitarvp" data-post="32" data-topic="18417">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/dimitarvp/48/38664_2.png" class="avatar"> dimitarvp:</div>
<blockquote>
<p>Not sure why people even come to dynamic languages expecting miracles of performance. Maybe they don’t realise that a lot of stuff in Python, JS and Ruby uses C libraries?</p>
</blockquote>
</aside>
<ol>
<li>
<p>I’m pretty sure that’s the case.</p>
</li>
<li>
<p>Elixir is easily 10x faster than Ruby at the CPU-specific parts (talking to database, parsing results, formatting output), so naturally Ruby folk see it as “blazing fast”. What they don’t realize is that C (Java, Go, Rust, etc) can be 100x-1,000x faster at those things than Ruby, thus also much faster than Elixir <img src="https://forum.elixirforum.com/images/emoji/apple/wink.png?v=15" title=":wink:" class="emoji" alt=":wink:" loading="lazy" width="20" height="20"></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="166136" data-batch-url="/posts/batch_likers">
                        3
                      </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/understanding-elixir-phoenix-performance/18417/33">Post #32</a>
	                </div>
	            </div>
              <div id="likers-container-166136" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="166136"
                     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 #32"></div>
  </section>
</div>
    <div class="postbit" id="166177" data-post-id="166177">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Which Elixir version is that? It returns fine on 1.9.4</p>
<p>NVM… I’m an idiot. I did not see the post date.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="166177" 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/understanding-elixir-phoenix-performance/18417/34">Post #33</a>
	                </div>
	            </div>
              <div id="likers-container-166177" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="166177"
                     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 #33"></div>
  </section>
</div>
    <div class="postbit" id="166184" data-post-id="166184">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="sribe" data-post="33" data-topic="18417">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/s/439d5e/48.png" class="avatar"> sribe:</div>
<blockquote>
<p>Elixir is easily 10x faster than Ruby at the CPU-specific parts (talking to database, parsing results, formatting output), so naturally Ruby folk see it as “blazing fast”. What they don’t realize is that C (Java, Go, Rust, etc) can be 100x-1,000x faster at those things than Ruby, thus also much faster than Elixir</p>
</blockquote>
</aside>
<p>I wouldn’t even say that is why people are always arguing over performance.</p>
<p>Real life example, we deployed an App last week, a rewrite of a Ruby (Sinatra) app, in Phoenix w/o assets etc (pure JSON API). We noticed that response times were about 150ms slower than with the Sinatra app.<br>
After further investigation, it turns out the apps compare very different on localhost. Phoenix would be much faster on localhost, with differences as big as Phoenix returning in 3ms and Sinatra in 80ms, but in other instances Sinatra being faster. Both in development mode, mind you.<br>
My best guess would be GC, DB connections being reestablished, maybe some caching etc kicking in at different times.</p>
<p>Further investigation turned out that the delay on the production server was a pretty consistent 80ms times X. Guess what, production app was slower because of the distance between app server to database server, meaning that a database query had to go from Singapore to the US based DB server, then back, with every database query. The old server was in the US, so there was no reasonable speed comparison.</p>
<p>Network connection is real, and in my experience usually a huge factor in how fast/snappy a web app can be. 120ms from Japan to US West coast is considered fast, do that 5 times, and there goes half a second. It’s usually a much bigger factor than the (lets say) 100ms Elixir could give you over Ruby.</p>
<p>Even if Elixir was slower than Ruby, it would have an easier time spawning new processes over Ruby (especially Rails) instantiating new instances, but you would not notice until you hit a certain concurrency level.</p>
<p>Languages have their weaknesses. PHP is the grumpy Grandpa shouting at clouds. C is the fastest way into the next wall - like a racing car with no breaks. Ruby is the nicest way to shoot yourself in the knee in a shiny way. Elixir is the worst way of improving speed coming from Ruby - “I built this boat exactly as I did my car, why does it not go fast!”. Go is Google.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="166184" 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/understanding-elixir-phoenix-performance/18417/35">Post #34</a>
	                </div>
	            </div>
              <div id="likers-container-166184" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="166184"
                     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 #34"></div>
  </section>
</div>
    <div class="postbit" id="166187" data-post-id="166187">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="sribe" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  sribe
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Well, my numbers come from comparing carefully-designed comparables, with the db co-located on the machine and accessed via domain socket <img src="https://forum.elixirforum.com/images/emoji/apple/wink.png?v=15" title=":wink:" class="emoji" alt=":wink:" loading="lazy" width="20" height="20"></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="166187" 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/understanding-elixir-phoenix-performance/18417/36">Post #35</a>
	                </div>
	            </div>
              <div id="likers-container-166187" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="166187"
                     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 #35"></div>
  </section>
</div>
    <div class="postbit" id="166188" data-post-id="166188">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="sribe" data-post="33" data-topic="18417">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/s/439d5e/48.png" class="avatar"> sribe:</div>
<blockquote>
<p>Elixir is easily 10x faster than Ruby at the CPU-specific parts</p>
</blockquote>
</aside>
<p>There are definitely cases where Ruby will outperform Elixir. For example, Ruby’s <code>compact</code> is implemented in C, while in Elixir we have to iterate a linked list in Elixir code. Ruby will inevitably work faster here (though Elixir will have some other benefits, such as non-blocking code).</p>
<p>Another thing going for Ruby’s performance is mutability. Yes, mutability is usually bad, and even though I’ve spent more than half of my programming life happily working with mutable data, I agree that immutable is a saner default in most cases. Regardless, there are occasional scenarios where mutability will do wonders for performance.</p>
<p>So I wouldn’t generalize that either is faster, and TBH it usually doesn’t matter. As I like to say (and I already said it here), if proper algorithmical and technical optimizations are done, the differences between any two languages frequently become irrelevant in practice. At least that’s my own limited experience. If the performance is still not good enough and we want to squeeze out every nanosecond, than neither Ruby nor Elixir are likely good choices, and hence the comparisons of their performances is IMO usually not very interesting or useful <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"></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="166188" data-batch-url="/posts/batch_likers">
                        3
                      </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/understanding-elixir-phoenix-performance/18417/37">Post #36</a>
	                </div>
	            </div>
              <div id="likers-container-166188" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="166188"
                     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 #36"></div>
  </section>
</div>
    <div class="postbit" id="166229" data-post-id="166229">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="Ninigi" data-post="35" data-topic="18417">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/ninigi/48/8006_2.png" class="avatar"> Ninigi:</div>
<blockquote>
<p>Guess what, production app was slower because of the distance between app server to database server, meaning that a database query had to go from Singapore to the US based DB server, then back, with every database query.</p>
</blockquote>
</aside>
<p>I don’t see this as being relevant at all for any comparison between any two languages and/or frameworks? Sorry if I misunderstood, you were probably making a bigger point.</p>
<aside class="quote no-group" data-username="Ninigi" data-post="35" data-topic="18417">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/ninigi/48/8006_2.png" class="avatar"> Ninigi:</div>
<blockquote>
<p>Elixir is the worst way of improving speed coming from Ruby - “I built this boat exactly as I did my car, why does it not go fast!”.</p>
</blockquote>
</aside>
<p>Because, it turns out, Elixir is not magic per se. It requires craftsmanship and playing to its strengths (which is actually very easy and I get frustrated when people treat Elixir as if it’s a mind-reader or Skynet-level general AI that will write their programs for them). But then again, needing craftsmanship skills applies to all technologies. Golang is derided in many programming circles yet the professional Golang devs can make wonders with it, both in terms of reliability and speed.</p>
<p>(<strong>EDIT:</strong> Still though, just by writing idiomatic Elixir – which isn’t hard and is times easier compared to Go or Rust – the average response time of my Phoenix apps is anywhere between 5x to 120x quicker than similar Rails or PHP or Python apps.)</p>
<aside class="quote no-group" data-username="sasajuric" data-post="37" data-topic="18417">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/sasajuric/48/991_2.png" class="avatar"> sasajuric:</div>
<blockquote>
<p>If the performance is still not good enough and we want to squeeze out every nanosecond, than neither Ruby nor Elixir are likely good choices, and hence the comparisons of their performances is IMO usually not very interesting or useful</p>
</blockquote>
</aside>
<p>Yep, agreed! Many of us are acutely aware of the strengths and weaknesses of Elixir (or any other tech we use, for that matter). I have factually and measurably observed that in 99% of my projects the app is waiting on a network or disk. However, Rails’ ActiveRecord wastes a lot of time serializing data from/to the DB while Ecto doesn’t. Additionally, outside of Rails and Laravel I didn’t hear about many frameworks that actually help you get productive quickly (maybe Rocket in Rust, still haven’t tried it but looks promising).</p>
<p>So for most webapps work Elixir clearly wins – in my eyes at least, because it can juggle a metric ton of I/O and CPU work without lagging or putting OS process pools in your face (as most of Ruby’s production servers force you to). Hosting costs are smaller as well, and things break much, much less frequently.</p>
<p>As usual, it’s about tradeoffs. If somebody finds themselves angry at the speed of a dynamic language then, well, obviously it’s time to learn C, C++, Go or Rust.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="166229" 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/understanding-elixir-phoenix-performance/18417/38">Post #37</a>
	                </div>
	            </div>
              <div id="likers-container-166229" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="166229"
                     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 #37"></div>
  </section>
</div>
    <div class="postbit" id="166236" data-post-id="166236">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="sribe" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  sribe
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="dimitarvp" data-post="38" data-topic="18417">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/dimitarvp/48/38664_2.png" class="avatar"> dimitarvp:</div>
<blockquote>
<p>However, Rails’ ActiveRecord wastes a lot of time serializing data from/to the DB while Ecto doesn’t.</p>
</blockquote>
</aside>
<p>I meant to mention that in my first post here, but spaced and forgot it. ActiveRecord is incredibly heavyweight. In fact, I’ve benchmarked a JSON API that returns a lot of detail records spending something like 99% of time in AR. Simply wrap the query in PG so that it returns JSON directly, then have RoR fetch and return that 1-col 1-row result directly, POOF! a 10x speedup <img src="https://forum.elixirforum.com/images/emoji/apple/wink.png?v=15" title=":wink:" class="emoji" alt=":wink:" loading="lazy" width="20" height="20"></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="166236" 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/understanding-elixir-phoenix-performance/18417/39">Post #38</a>
	                </div>
	            </div>
              <div id="likers-container-166236" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="166236"
                     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 #38"></div>
  </section>
</div>
    <div class="postbit" id="166237" data-post-id="166237">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Yeah, we all have to resort to such hacks every now and then I am not objecting to that too much. It’s just that for the 6 years I worked with RoR this has been the rule and not the exception and at one point you start asking yourself “isn’t there a better way?”.</p>
<p>Turns out, there is – Elixir. <img src="https://forum.elixirforum.com/images/emoji/apple/smiley.png?v=15" title=":smiley:" class="emoji" alt=":smiley:" loading="lazy" width="20" height="20"></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="166237" 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/understanding-elixir-phoenix-performance/18417/40">Post #39</a>
	                </div>
	            </div>
              <div id="likers-container-166237" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="166237"
                     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 #39"></div>
  </section>
</div>
    <div class="postbit" id="187114" data-post-id="187114">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Nice !</p>
<p>Now what if we spawn a different process for working over each directory and then collected the result, after all of them are done, something like the async_stream/3 function of the Task module might help. This although not a fair comparison with other languages, but might lead to huge performance benefits.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="187114" 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/understanding-elixir-phoenix-performance/18417/41">Post #40</a>
	                </div>
	            </div>
              <div id="likers-container-187114" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="187114"
                     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 #40"></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/18417/load_more?page=5">Load more posts (3 remaining)</a>
</div></template></turbo-stream>