HASTY.dev
banner
hasty.dev
HASTY.dev
@hasty.dev
Unlock Performance Insights & Optimize JS with Benchmarking
Polynomial Space: O(n^k)

O(n^k) space: Memory grows as a power of input size. Storing all pairs of items, for example 😬 #PolySpace #Memory
January 26, 2025 at 5:03 PM
Log-Linear Space: O(n log n)

O(n log n) space: Memory grows faster than linear, slower than quadratic. Like books + a card catalog 🗄️ #LogLinear #Nlogn
January 26, 2025 at 5:03 PM
Logarithmic Space: O(log n)

O(log n) space: Super efficient! Memory grows slowly. Think dictionary search - use the index, not every page! 📖 #LogSpace #Ologn #Efficient
January 26, 2025 at 5:03 PM
Linear Space: O(n)

O(n) space: Memory grows directly with input size. Like needing more bookshelf space for more books 📚 #LinearSpace #On #Memory
January 26, 2025 at 5:03 PM
Constant Space: O(1)

O(1) space: Same memory, no matter the input size! Like a single scratchpad for any calculation 📝 #ConstantSpace #O1 #Memory
January 26, 2025 at 5:03 PM
Intro to Big-O & Space

How much memory does your code use? 🤔 Big-O notation helps us understand space complexity! Let's explore! 🧠 #BigO #SpaceComplexity #Coding
January 26, 2025 at 5:03 PM