Performance

Memory

  • alignment

    • efficient memory load
  • locality

    • time
    • space
    • data dependency
      • vectorize
  • cache line

    • 多线程共享数据,避免cache line 重叠, false sharing
  • stack prefaulting

  • jemalloc

Branch

  • [[likely]]
  • constexpr if
  • compile time polymorphism
    • visit variant

Concurrency

  • wait free
  • lock free
  • memory model
    • store buffer
    • load buffer
  • context switch
    • thread
    • fiber
    • coroutine

CPU instruction

  • floating point denormals

other

ref

https://en.wikichip.org

posted @ 2022-04-20 12:12  fndefbwefsowpvqfx  阅读(89)  评论(0编辑  收藏  举报