<turbo-stream action="append" target="posts_list"><template>    <div class="postbit" id="377452" data-post-id="377452">
  <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>This is an intriguing discussion, I have always found it easier to make a decent assumption when it comes to SQL, since you’re working on sets, big table without indexes slow, many joins with suboptimal filters slow and so on since you’re literally just creating exponential queries in some cases.</p>
<p>But obviously there a non intuitive cases where you gotta reach for explain to understand why the query planner didn’t do what you expected it to do regardless of indexes.</p>
<p>But the same is true for any type of performance optimization, in the end you gotta read the assembly, which is annoying but arguably less today with AI.</p>
<p>Back to your question, is there no way to think about it natively. Big O tells you about access patterns into your data. So the language is completely irrelevant, I don’t even think (correct me if I’m wrong) that any language is used when teaching this academically, since pseudo code is preferable in these cases. That said immutable language have to used different data structures to guarantee the language constraints, although we still have safe mutability with constant time access in Erlang. The best way I found to learn about a language specific behaviour and complexity is to Google and the use of LLM. LLM are great for these kinda open ended question if you don’t have concrete question with a specific data structure and algorithm in mind where you can just look up the documentation.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="377452" 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/how-do-you-think-about-time-complexity-while-working-with-elixir-and-other-declarative-languages/73095/12">Post #11</a>
	                </div>
	            </div>
              <div id="likers-container-377452" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="377452"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-last-post cat-last-post" title="Last post!"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <span class="all-loaded">— All posts loaded —</span>
</div></template></turbo-stream>