bwrrp/slimdom.js — pull request #5 by DrRataplan (2014-03-18 08:53:10+00:00)
Title: Improve commonAncestor by using a single loop instead of two shift()s

See http://jsperf.com/two-array-shift-vs-for

This optimization improves the commonAncestor() function a lot, since this is called a huge bunch of times, this is a viable change.

The signature and behaviour is identical