计算机科学。
2020-02-07
计算机可以是一个计算工具,为了实现一个计算而写一行,所以数学系的常用MATLAB进行计算。
计算机本身也是一个机器设计的科学,里面有许多的机制与策略,为了让机器更快更有效率,更稳定,更易用,更易于扩展,更简洁易懂,更开放等等,这些是一种设计的科学和精神。有些代码可以恒久经典,必然有其设计理念的先进。
1 笨笨的孩子慢慢学stay hungry stay foolish 2 学习,思考,实践,改变
参考JS的V8里头的优化说明:
With the x86-64 instruction set, this means we can’t use direct calls: they take a 32-bit signed immediate that’s used as an offset to the address of the call, and the target may be more than 2 GiB away. Instead, we need to rely on indirect calls through a register or memory operand. Such calls rely more heavily on prediction since it’s not immediately apparent from the call instruction itself what the target of the call is.
It should reduce strain on the indirect branch predictor as the target is known after the instruction is decoded, but it also doesn’t require the target to be loaded into a register from a constant or memory.