var d = document;

function test1() {
	var p = d.createElement('div'), n;
	n = p.appendChild(d.createElement('div'));
	n = n.appendChild(d.createElement('div'));
	n = n.appendChild(d.createElement('div'));
	n = n.appendChild(d.createElement('div'));

	return p;
	};

function e(nn, q) {
	if (!q) return d.createElement(nn);
	(nn = d.createElement(nn)).appendChild(q);
	return nn;
	};

function test2() {
	return e('div',
		e('div',
			e('div',
				e('div',
					e('div')
					)
				)
			)
		);
	};
Intel Pentium Dual Core E2160  1.8GHz

IE9 - test1: 293   test2: 891     test2/test1 = 3.04
IE8 - test1: 296   test2: 648     test2/test1 = 2.19
FF3.6.4 - test1: 62   test2: 63     test2/test1 = 1.01