アセンブリ言語最強伝説
■ このスレッドは過去ログ倉庫に格納されています
0439デフォルトの名無しさん
2010/12/05(日) 03:08:58Cimpiler Intrinicsの説明に書いてあるね。
If a function is an intrinsic, the code for that function is usually inserted inline, avoiding the overhead
of a function call and allowing highly efficient machine instructions to be emitted for that function.
An intrinsic is often faster than the equivalent inline assembly, because the optimizer has a built-in
knowledge of how many intrinsics behave, so some optimizations can be available that are not available
when inline assembly is used. Also, the optimizer can expand the intrinsic differently, align buffers
differently, or make other adjustments depending on the context and arguments of the call.
VCの場合、アセンブラのいくつかの命令をコンパイラ固有命令として組み込んであって、VCの中でそれを
使ってもらうとinline命令で書いた場合より速くなることがある。その理由は、コンパイラがオプティマイザが
個々の組み込み関数の挙動をよく知っていて最適化するようなコードを吐き出せるかららしい。
ただ、これはあくまでVC固有の機能だから他のコンパイラでは使えないし、移植する場合も面倒になる。
■ このスレッドは過去ログ倉庫に格納されています