arthrop0d

Brief articles on varied topics.

performance

51 articles tagged performance.

  1. Go Map Buckets, Tophash, and Incremental Growth

    How Go maps use bucket arrays, one-byte tophash metadata, overflow buckets, and incremental evacuation to grow without stopping lookups.

    golangalgorithmsperformance

  2. DNS Negative Caching

    How resolvers cache NXDOMAIN and NODATA responses, use SOA TTLs, and delay visibility of newly created DNS records.

    networkingperformance

  3. Compiler Escape Analysis

    How compilers prove objects can stay on the stack, reducing allocation and garbage-collection cost while limiting unnecessary sharing.

    compilersperformance

  4. Speculative Decoding

    A small model drafts several tokens so a larger model can verify them in one pass while preserving the larger model’s sampling distribution.

    artificial intelligenceperformance

  5. TLB Shootdowns and Cross-Core Address Invalidation

    How operating systems invalidate stale virtual-address translations across CPU cores when page-table mappings change.

    operating systemsperformance

  6. Transformer KV Cache Memory and Autoregressive Decoding

    The KV cache keeps attention keys and values for prior tokens, avoiding repeated computation but consuming memory with every layer, token, and request.

    artificial intelligenceperformance

  7. LSM-Trees, Memtables, SSTables, and Compaction

    How LSM-trees turn writes into sorted files, then use compaction to balance write cost, read amplification, and storage space.

    databasesperformance

  8. SQL Cardinality Estimation and Query Plans

    How column statistics and histograms predict row counts—and how bad predictions lead to poor joins, scans, and unexpectedly slow queries.

    sqldatabasesperformance

  9. Go Escape Analysis and Stack versus Heap Allocation

    How Go’s compiler tracks references to place values on goroutine stacks or the heap, and why the choice affects allocations, garbage collection, and speed.

    golangcompilersperformance

  10. How HyperLogLog Estimates Distinct Values

    HyperLogLog estimates cardinality with compact hash-derived registers, using statistical averaging and bias corrections to stay accurate at scale.

    algorithmsmathematicsperformance

  11. TLB Shootdowns and Cross-Core Page-Table Invalidation

    How CPUs cache virtual-to-physical mappings, why page-table changes require cross-core invalidation, and where the performance cost comes from.

    operating systemsperformancecomputer science

  12. CPU Branch Predictors and Speculative Execution

    How history tables predict control flow, how CPUs execute ahead of branches, and why a wrong prediction flushes useful work.

    performancecomputer science

  13. Transformer Key-Value Cache During Text Generation

    A transformer KV cache keeps prior attention keys and values so each generated token avoids rebuilding the whole preceding context.

    artificial intelligenceperformance

  14. JavaScript Objects, Hidden Classes, and Inline Caches

    How JavaScript engines give objects shapes, speed repeated property access, and fall back when those shapes stop matching optimized code.

    javascriptperformance

  15. How Compiler Register Allocation Uses Interference and Spilling

    Register allocation assigns live intermediate values to CPU registers, building interference constraints and spilling selected values to memory when registers run out.

    compilersalgorithmsperformance

  16. Copy-on-Write fork() and Copying Page Faults

    How Linux makes fork() cheap by sharing memory pages until parent or child writes to one.

    linuxoperating systemsperformance

  17. AWS Lambda Execution Environments and Cold Starts

    How Lambda initializes execution environments, reuses their state, and creates separate environments as concurrent invocations increase.

    amazon web servicesperformance

  18. TLB Shootdowns and Cross-Core Translation Invalidation

    How operating systems keep per-core address-translation caches correct when a process’s page tables change.

    performanceoperating systems

  19. Transformer Key-Value Cache During Generation

    A transformer KV cache keeps earlier attention keys and values so each generated token avoids rebuilding the entire prefix.

    artificial intelligenceperformance

  20. Go’s Concurrent Garbage Collector

    How Go combines tri-color marking, write barriers, and brief pauses to reclaim unreachable heap objects while goroutines keep running.

    golangperformance

  21. Linux io_uring Shared Rings and Batching

    How io_uring moves requests through shared submission and completion rings, and how batching and polling reduce syscall and scheduling costs.

    linuxoperating systemsperformance

  22. Linux Page Cache and Dirty-Page Writeback

    How Linux serves file reads from memory and turns modified cached pages into storage writes and durable data.

    operating systemsperformance

  23. HTTP/2 HPACK Header Compression

    How HPACK uses shared tables, indexed fields, and Huffman coding to reduce HTTP/2 header overhead without losing decoder synchronization.

    web developmentperformance

  24. Python’s Vectorcall Protocol

    How CPython passes callable arguments as arrays to avoid temporary tuples, dictionaries, and bound methods on common calls.

    pythonperformance

  25. Linux TLB Shootdowns on Multicore Systems

    How Linux keeps per-CPU virtual-to-physical translation caches correct, and why invalidating them with IPIs can hurt multicore performance.

    linuxoperating systemsperformance

  26. Speculative Decoding with Draft and Target Models

    Speculative decoding uses a fast model to propose tokens and a slower model to verify several of them in parallel, reducing generation latency.

    artificial intelligenceperformance

  27. Compiler Escape Analysis and Stack Allocation

    How compilers follow object references to decide whether an allocation can stay in a stack frame or must be managed on the heap.

    compilersperformance

  28. Cgroups v2 Resource Control for Containers

    How cgroups v2 hierarchies account for and limit CPU time, memory, and process creation inside containers.

    containersoperating systemsperformance

  29. Rust Monomorphization and Static Dispatch

    How Rust generates type-specific code for generics, and why that improves call performance while increasing build time and binary size.

    compilersrustperformance

  30. V8 Hidden Classes and Inline Caches

    How V8 tracks JavaScript object shapes, specializes property access, and deoptimizes code when those assumptions stop being true.

    javascriptperformance

  31. TCP Slow Start and Congestion Window Growth

    How TCP uses acknowledgements to grow its sending window, then reacts to loss or ECN congestion signals.

    networkingperformance

  32. Transformer KV Cache During Text Generation

    How transformers store attention keys and values to avoid recomputing prior tokens, and why longer contexts consume more inference memory.

    artificial intelligenceperformance

  33. Linux Page-Cache Readahead

    How Linux detects sequential file access, reads pages early, and limits wasted I/O when access becomes sparse or random.

    linuxoperating systemsperformance

  34. CPU Branch Predictors and Speculative Execution

    How CPUs record branch history, execute past unresolved decisions, and discard pipeline work when a prediction is wrong.

    performance

  35. Linux Dirty Pages, Writeback, and fsync

    How Linux caches file writes in RAM, writes them back in the background, and uses fsync to establish a durability boundary.

    linuxoperating systemsperformance

  36. Git Commit-Graph Files and Generation Numbers

    How Git records commit relationships and generation data to answer ancestry, merge-base, and reachability queries with fewer object walks.

    gitperformance

  37. Linux Copy-on-Write Across forked Processes

    How Linux shares forked processes’ pages, changes their page tables, and copies memory only when a write triggers a page fault.

    linuxoperating systemsperformance

  38. AWS Lambda Execution Environment Lifecycle

    How Lambda initializes, reuses, freezes, and thaws environments—and why global state changes cold-start and warm-invocation performance.

    amazon web servicesperformance

  39. TLB Shootdowns and Deferred Invalidation

    How CPUs keep page-table changes safe, why TLB shootdowns interrupt other cores, and how batching reduces their performance cost.

    operating systemsconcurrencyperformance

  40. Go’s Garbage-Collector Pacer and Mutator Assists

    How Go’s GC pacer budgets marking CPU and makes allocating goroutines help when concurrent collection falls behind.

    golangperformance

  41. Mixture-of-Experts Routing and Load Balancing

    How MoE routers send tokens to a few expert networks while capacity limits and balancing losses prevent overloaded experts.

    artificial intelligenceperformance

  42. DynamoDB Adaptive Capacity and Hot Partition Keys

    DynamoDB adaptive capacity shifts unused throughput toward hot partition keys while keeping the table’s provisioned capacity unchanged.

    amazon web servicesdatabasesperformance

  43. Go’s G-M-P Scheduler

    How Go’s goroutines, OS threads, processors, run queues, and work stealing determine concurrency, latency, and throughput.

    golangconcurrencyperformance

  44. NIC Interrupt Coalescing and Packet-Batching Tradeoffs

    How NICs batch packet notifications to reduce CPU overhead, and how coalescing thresholds trade that efficiency against network latency.

    electrical engineeringnetworkingperformance

  45. Compiler Escape Analysis and Stack Versus Heap

    Escape analysis predicts whether a value can outlive its function, guiding stack or heap placement and influencing allocation and garbage-collection costs.

    compilersperformance

  46. CPU Cache-Line False Sharing

    Learn why independent writes can invalidate each other’s cache lines, and how padding and data layout prevent coherence-driven slowdowns.

    performancecomputer science

  47. SQL Selectivity Estimates and Query Plans

    How database planners use histograms to estimate matching rows, and how bad estimates lead to unexpectedly slow scans, joins, and indexes.

    sqldatabasesperformance

  48. LLM Key-Value Caches During Autoregressive Generation

    How cached attention keys and values eliminate repeated prefix work during generation, and why the speedup consumes substantial memory.

    artificial intelligenceperformance

  49. Copy-Up in Container Overlay Filesystems

    How Linux overlay filesystems combine read-only image layers with a writable container layer and copy files up when a write requires them.

    containerslinuxperformance

  50. Linux TLB Shootdowns and Their Performance Cost

    How Linux keeps per-core address-translation caches consistent when page-table entries change, and why that coordination can slow workloads.

    linuxoperating systemsperformance

  51. CPython’s Global Interpreter Lock

    How CPython’s GIL protects interpreter state, coordinates thread execution, and lets native extensions run parallel or blocking work safely.

    pythonperformanceconcurrency

← All tags