Depends. There are several scenarios:
SCENARIO A
If in the 'busy-wait' is waiting for is a hardware operation (for example, reading a sector from a hard disk to memory):
1) The hardware will do the operation.
2) The driver will launch an interruption.
3) The operating will halting the actual process (your busy-wait process), saving the actual value any CPU registers the interruption will override in its procesing.
4) The interruption will be processing, modifing any flags that indicates the data is available (in case of a disk reading).
5) any overriden registers will be restored.
6) Your process will continue with its process. Just in the next iteration it will call to the conthe condition of the loop. For example, if the busy wait is:
while( !fileReady() ){
...
}
The fileReady() method will be a method that internally will check if a concrete flag (the flag that is modified in 4) is set or not.
7) So just in the next iteration, the loop will enter and do the opeartions.
Take in mind that if there are another process running (operating system processes, other programs), they will put your process to the process tail. Also, the operating system can decide that, given your process has used all the CPU cycles he could (it spend its quantum), it will have less priority that other process that went to sleep (instead using a busy-wait approach) when it needed to wait for a certain condition.
Conclusion. It is faster if no other external process are running (very unlikely) in the same core/CPU.
SCENARIO B
By the other hand, if the busy-method is waiting for another process to end (or set any variable to a certain value, the busy-wait will be slower.
1) The busy-method will run in the CPU. Since the other process is not running, the conditions can't change, so the busy-method will run until the CPU ddecides to give CPU time to another process.
2) The other process will run. If this process spend the time without achieve the confition the busy-wait process need, then go to 1), else continue to 3)
3) The other (not the busy-wait) process will still run for a while, until the cpu decides a new process change.
4) The busy-method will run again, but the conditions now is meet, so the operations ar now done.
Conclusion: Its slower, and we also slow the entire process.
SCENARIO C
What if we have the same scenario than B, but with several cores (one process in each core)?.
First, remember that even if you have a CPU with several cores, your program may is not allowed to use more than one. And maybe there are some operating system or other programs using them.
Second, it thas not worth the price. Take in mind that the process must communicate to allow the busy-wait to find out that the condition is meet. This is usually can be done by a 'final' variable so you will need a enter in a synchronize block each time you evaluate the condition (you can't lock before entering the loop and no unlock it, beacause in taht case the other process will not be able to change the variable. So you will need something like this:
boolean exit = false;
while( exit==false ){
synchronize(var){
if(var = CONDITIONS_MEET)
exit=true;
}
}
//operations...
}
¡¡ But the wait-notify will do somethig similar, and more efficiently (at language-level), without wasting CPU cycles, and using good prectices !!
Conclusion: your are complicating your life doing somthing that very unlikely will be faster (very very very unlikely).
Final conclusion: Only if you are in a very very simple scenario when you know concrete details of the operating system and the environment which your program will be run, you can consider a busy-wait approach.
I hope this will anserw your question. Don't hesitase to ask if somthing is not clear.