InputStream2Node t1 = new InputStream2Node();
FastInfoset2Node t2 = new FastInfoset2Node();
InputStream is1 = new ByteArrayInputStream(str);
InputStream is2 = new ByteArrayInputStream(fast);
long s1 = System.currentTimeMillis();
Node n1 = t1.transform(is1, null);
long s2 = System.currentTimeMillis();
Node n2 = t2.transform(is2, null);
long s3 = System.currentTimeMillis();
d1 += s2 - s1; // from plain xml
d2 += s3 - s2; // from fastinfoset