Liking cljdoc? Tell your friends :D

Benchmarks

The benchmarks time the parser on large real pages, next to the time that html-pieces/parse takes to read the same pages into Hiccup:

  • Parse is html-pieces/parse of the HTML.
  • Microformats is mf/parse of the Hiccup, i.e. what the parser adds when you already have the tree.
  • Share is Microformats as a share of Parse.
  • Both is mf/parse of the HTML.

Each time is the median of 21 rounds, after 10 rounds to warm up. They're from an Apple M1 that was busy with other work, so take them as a rough guide. The shares were the same in every run.

PageWhat
indieweb-chat-2015-07-12IndieWeb chat log, an h-entry with an h-card for each of 1,984 messages
indieweb-chat-2017-06-24IndieWeb chat log, the same markup
wikipedia-falcon-9-launchesWikipedia list, thousands of links with rels
ecma-262-2025ECMAScript 2025, one page with no microformats

The JVM, Java 24:

PageSizeParseMicroformatsShareBoth
indieweb-chat-2015-07-121.83 MB65.7 ms32.8 ms50%110.4 ms
indieweb-chat-2017-06-241.48 MB54.1 ms26.7 ms49%87.7 ms
wikipedia-falcon-9-launches3.12 MB88.1 ms20.4 ms23%128.6 ms
ecma-262-20257.33 MB451.9 ms29.6 ms7%515.1 ms

Node 24, compiled with advanced optimizations:

PageSizeParseMicroformatsShareBoth
indieweb-chat-2015-07-121.83 MB117.8 ms102.9 ms87%230.5 ms
indieweb-chat-2017-06-241.48 MB88.2 ms82.9 ms94%176.3 ms
wikipedia-falcon-9-launches3.12 MB146.7 ms79.8 ms54%247.7 ms
ecma-262-20257.33 MB702.1 ms104.7 ms15%898.7 ms

The chat logs are the hardest case, since nearly every element of them is part of a microformat. Most pages have far fewer microformats than elements, and there the parser adds little more than one walk of the tree.

To run them, see the README.

Can you improve this documentation?Edit on GitHub

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close