找到行索引的有效方法?

Tru*_*an1 0 html javascript performance jquery jquery-selectors

我通过这样做得到一行的索引:

row.parent().children("tr").index(row)
Run Code Online (Sandbox Code Playgroud)

有没有更有效的方法来查找索引?我有数百行,所以它杀死我的性能,我必须选择所有行只是为了找到索引.

Tua*_*uan 5

怎么样row.prevAll().length