Code injecting/assembly inlining in Java?

前端 未结 6 753
隐瞒了意图╮
隐瞒了意图╮ 2021-02-03 11:00

I know Java is a secure language but when matrix calculations are needed, can I try something faster?

I am learning __asm{} in C++, Digital-Mars compiler and FASM. I wan

6条回答
  •  名媛妹妹
    2021-02-03 11:23

    It is possible to call assembly from Java using the Machine Level Java technology. It transparently packs your assembly code, written in Java, but very similar to the most used assembly syntax, into a native library. And next you just need to call a native method, that you define in the same class, where your assembly is written. So, you always stay within Java environment and have no need to switch from Java IDE to some assembly tools and then back to Java.

提交回复
热议问题