I\'m writing a performance-critical, number-crunching C++ project where 70% of the time is used by the 200 line core module.
I\'d like to optimize the core using inl
You can access variables by their name and copy them to registers. Here's an example from MSDN:
int power2( int num, int power )
{
__asm
{
mov eax, num ; Get first argument
mov ecx, power ; Get second argument
shl eax, cl ; EAX = EAX * ( 2 to the power of CL )
}
// Return with result in EAX
}
Using C or C++ in ASM blocks might be also interesting for you.