All pastes #990924 Raw Edit

Someone

public text v1 · immutable
#990924 ·published 2008-04-20 15:57 UTC
rendered paste body
class Foo {private:	int a,b,c;	float d;	const char* e;	double f;public:	Foo();}Foo::Foo():	a(1), b(2), c(3), d(3.14159), e("Hello world"), d(1.0f){	//The compiler will probably put a single block of memory in the executable	//containing all those elements in that order, and just copy the whole block	//directly into the new object. When using assignment inside the	//constructor, it would actually assign elements one by one. The difference	//is *tiny*, but may matter on embedded processors. For example, x86 CPUs	//would pipeline the instructions to assign the elements and will be	//probably quite fast anyway.}