What is the cost of a function call?

后端 未结 15 786
天命终不由人
天命终不由人 2020-12-12 22:34

Compared to

  • Simple memory access
  • Disk access
  • Memory access on another computer(on the same network)
  • Disk access on another computer
15条回答
  •  南笙
    南笙 (楼主)
    2020-12-12 23:18

    Compared to a simple memory access - slightly more, negligible really.

    Compared to every thing else listed - orders of magnitude less.

    This should hold true for just about any language on any OS.

提交回复
热议问题