V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
dtgio
V2EX  ›  问与答

本地库、本地代码、原生库、原生代码分别是什么意思?

  •  
  •   dtgio · 2017-12-07 19:04:35 +08:00 via iPhone · 3764 次点击
    这是一个创建于 2572 天前的主题,其中的信息可能已经有所发展或是发生改变。
    经常听到或看到这些词,但是不清楚具体是什么意思。。
    1 条回复    2018-10-01 15:36:00 +08:00
    dtgio
        1
    dtgio  
    OP
       2018-10-01 15:36:00 +08:00
    https://searchmicroservices.techtarget.com/definition/native-code

    Native code is computer programming (code) that is compiled to run with a particular processor (such as an Intel x86-class processor) and its set of instructions. If the same program is run on a computer with a different processor, software can be provided so that the computer emulates the original processor. In this case, the original program runs in "emulation mode" on the new processor and almost certainly more slowly than in native mode on the original processor. (The program can be rewritten and recompiled so that it runs on the new processor in native mode.)


    Native code can also be distinguished from bytecode (sometimes called interpreted code), a form of code that can be said to run in a virtual machine (for example, the Java Virtual Machine). The virtual machine is a program that converts the platform-generalized bytecode into the native code that will run in a specific processor. Microsoft's .NET compilers for its Visual Basic, C#, and JavaScript languages produce bytecode (which Microsoft calls Intermediate Language). Java bytecode and Microsoft's Intermediate Language can be compiled into native code before execution by a just-in-time compiler for faster performance.

    本机代码是计算机编程(代码),编译为与特定处理器(例如 Intel x86 级处理器)及其指令集一起运行。如果在具有不同处理器的计算机上运行相同的程序,则可以提供软件以使计算机模拟原始处理器。在这种情况下,原始程序在新处理器上以“仿真模式”运行,并且几乎肯定比原始处理器上的本机模式慢。 (该程序可以重写并重新编译,以便它以纯模式在新处理器上运行。)


    本机代码也可以与字节码(有时称为解释代码)区分开来,字节码是一种可以说在虚拟机中运行的代码形式(例如,Java 虚拟机)。虚拟机是一个程序,它将平台通用字节码转换为将在特定处理器中运行的本机代码。微软用于 Visual Basic,C #和 JavaScript 语言的.NET 编译器产生字节码(微软称之为中间语言)。Java 字节码和 Microsoft 的中间语言可以在由即时编译器执行之前编译为本机代码,以提高性能。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2864 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 12:27 · PVG 20:27 · LAX 04:27 · JFK 07:27
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.