This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'hexapdf' | |
doc = HexaPDF::Document.open(ARGV[0]) | |
outline = doc.catalog[:Outlines] | |
first_entry = outline[:First] | |
last_entry = outline[:Last] | |
current = first_entry | |
loop do | |
puts current[:Title] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Without YJIT on Ruby 3.4.1 | |
Warming up -------------------------------------- | |
kramdown 259.422 i/s - 270.000 times in 1.040775s (3.85ms/i) | |
versadok 1.158k i/s - 1.265k times in 1.091970s (863.22μs/i) | |
Calculating ------------------------------------- | |
kramdown 276.681 i/s - 778.000 times in 2.811901s (3.61ms/i) | |
versadok 1.138k i/s - 3.475k times in 3.052762s (878.49μs/i) | |
Comparison: |
OlderNewer