Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
从使用大端到小端的转换过程有多快?
非常快。它是大多数架构上的单一机器语言操作码。即使在古老的硬件上,它也只会在 2-3 个时钟周期内执行。
速度很大程度上取决于实现和语言。内联机器代码非常快,但以解释语言运行的实现可能要慢几个数量级。如果它不是内联的,过程调用开销可能比实际的字节交换花费更多的时间。