Does typing affect computer memory?
Image: Mike Cai Chen, CC0, via Wikimedia Commons
Does typing affect computer memory?
Imagine you're packing for a trip and have to decide between flexible clothing that can be worn in multiple ways (dynamic) versus clothes that are only good for one specific occasion (static).
Dynamic typing is like packing flexible clothing; it can adapt at runtime to different situations. Static typing is like packing clothes for one specific occasion; it's set in advance.
Example
With dynamic typing, you can change the type of data a variable holds on the fly, like switching from a shirt to shorts without needing new clothes.
Remember this
Dynamic typing can save memory because it doesn't require the computer to store data types until runtime.
Text adapted from Wikipedia, licensed under CC BY-SA 4.0.
Loop nest optimization
Can speeding up your computer make tasks quicker?
most transformer operations are memory-bound, not compute-bound
Why do computers sometimes get tired?
torch.compile does in PyTorch 2.0: traces and optimizes the computation graph
Ever wondered how computers speed up learning?
Flashbulb memory
Flashbulb memories are vivid but not always accurate
Triton differs from CUDA
Why does a super-fast computer sometimes run slower than a regular one?
loop unrolling does: trades code size for reduced loop overhead
Can we speed up our computer programs?
Swipe through 100 ML concepts daily
Open Pocket Polymath