What is more effective, a do while or a while?
While and do while differ only in the first execution when condition is false. If you ignore this difference it boils down to the place of condition check, in while the condition is checked and if it is true the statements are executed. In the do while the condition check is executed after the block execution.

The code is exactly the same, with one line reordered.

If you want to do micro-optimisations please check whether these are worthy of your time. Compiler does really great job nowadays, unless it doesn't then change the compiler.

So under the hood they are equivalent.