getElementById() vs. XPath benchmark

      Loading whole document into memory with DOM
      Running 100 times following queries
  • XPath Queries
    • //*[@ID = 9999]
    • //entry[@ID = 9999]
    • /planet/entry/id[text() = 9999]
    • /planet/entry[@ID = 9999]
    • id('entry9999')
  • getElementById()
 
Benchmark Results - Small File © copyright 2004  Bitflux GmbH