Hmmm... This little snip of code is from my project, and it is working. Just to give you another example.
This piece of code stores a pointer (address) of an entity in one of it's skills.
if(platform.skill[i] == 0) //cycle through the allocated slots
{
platform.skill[i] = (ENTITY*)me; //store my pointer for later manipulation
return(0);
}
i++; //move up one skill slot
In this piece, the stored pointer is used.
vec_add(((ENTITY*)my.skill[i]).x,vector(0,0,-1000));
The manual lists ptr_for_handle as having a speed of medium. I'm not sure if using a cast is actually faster, but I would guess so. A good way to test the speed is to use the timer() function.
Good luck!