linux c++ 函数效率,linux比windows快很多倍除了算法的优势 有没C比C++快的原因?

该楼层疑似违规已被系统折叠 隐藏此楼查看此楼

C和C++混合的,当然还有汇编

引用:

Most of the source code for Windows NT is written in C or C++. These

high-level languages make it relatively easy to port Windows NT to

different types of workstations. The same source code can be recompiled

to build versions of Windows NT that are specific to each processor's

instruction set.

A small amount of the code in Windows NT is written in

assembly language. Typically, this is code that either interacts

directly with a computer's hardware, or needs to run extremely fast.

Because assembly language is specific to a particular instruction set,

this code must be rewritten once for each type of processor on which

Windows NT will run. To make it easy to locate and maintain, this code

is isolated to just a few key places in the operating system:

The kernel is the heart of the Windows NT operating system.

It controls which threads are run on the system's processor(s), and

provides synchronization mechanisms that allow threads on multiple

processors to coordinate their access to operating system data

structures. It also dispatches interrupts and exceptions to the

appropriate handler routines. To optimize the speed of these

system-critical operations, portions of the kernel are written in

assembly language.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值