Do you have a particular reason for using a never-ending loop, and even, manipulating the DOM with every each step?
If you use the while loop it'll most likely to lock the browser and client completely, also causing a possible CPU over-load if not terminated in a way.
The loop while tries to finish it's work in the most possible least microseconds. So it may even try to execute a million steps in a possible second, and maybe even more, in this case it depends on the client. However, at such speed updating the DOM wouldn't be possible.
In the case for setInterval, it's quite different from while loop, in fact, it's more appropriate to call it a function repeater. It repeats the given function after the given time is passed. So even if the time is 0, it has a step where it checks if the waiting time has passed now, and should the next repeat be run.
So you may consider while loop more instant than of 0 seconds delay.