I had a look at the generated assembly for each of these techniques, using the following program:
#include <new>
char blob[128];
int main() {
void *pLocation = blob;
char pattern = 'x';
#ifdef CAST
*reinterpret_cast<char*>(pLocation) = pattern;
#else
::new(pLocation) char(pattern);
#endif
}
I'm using g++ 4.4.3 on Linux 64-bits with default compiler flags.
The relevant part of the asm for placement new:
movb $120, -1(%rbp)
movq -16(%rbp), %rax
movq %rax, %rsi
movl $1, %edi
call _ZnwmPv
movq %rax, %rdx
testq %rdx, %rdx
je .L5
movzbl -1(%rbp), %edx
movb %dl, (%rax)
.L5:
From what I gather, this actually calls the placement new operator, and checks its return value, even though it always succeeds. It then proceeds to write the value of x into the returned memory.
And for the reinterpret_cast:
movb $120, -1(%rbp)
movq -16(%rbp), %rax
movzbl -1(%rbp), %edx
movb %dl, (%rax)
Note that these instructions are identical to the first two and the last two of the placement new version.
Using -O1, both pieces of code generate identical assembly:
movb $120, blob(%rip)
So, if you're worried about performance, don't be. Any other sane compiler will probably reduce both to the same code as well.