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
$:.unshift(File.expand_path('../lib', __FILE__)) | |
require 'oga' | |
require 'benchmark/ips' | |
require 'nokogiri' | |
query = 'foo/bar/baz > 20' | |
ast = Oga::XPath::Parser.new(query).parse | |
compiler = Oga::XPath::Compiler.new | |
block = compiler.compile(ast) |
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
# Generated from XPath "20 > root/a" | |
lambda do |node, variables = nil| | |
op_left1 = begin | |
20.0 | |
end | |
op_right2 = begin | |
catch(:value) do || | |
node.children.each do |node| | |
if (node.is_a?(Oga::XML::Attribute) || node.is_a?(Oga::XML::Element)) && node.name == "root" |
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
trap 'USR2' do | |
Rubinius::VM.dump_heap("/tmp/rbx-#{Process.pid}.dump") | |
end |
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 'oga' | |
require 'thread' | |
xml = <<-EOF | |
<people> | |
<person> | |
<name>Alice</name> | |
</person> | |
</people> | |
EOF |
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
(gdb) r | |
Starting program: /home/yorickpeterse/.rubies/rbx-git/bin/rbx populate_queue.rb | |
[Thread debugging using libthread_db enabled] | |
Using host libthread_db library "/usr/lib/libthread_db.so.1". | |
[New Thread 0x7ffff1210700 (LWP 31314)] | |
Connecting... | |
Starting threads... | |
[New Thread 0x7fffd37d7700 (LWP 31320)] | |
[# ] [ 1910/6146778] [ 0.03%] [00:04] [04:11:05] [ 407.89/s][New Thread 0x7fffd13ce700 (LWP 31329)] | |
[New Thread 0x7fffd0bcc700 (LWP 31331)] |
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
Starting program: /home/yorickpeterse/.rubies/rbx-git/bin/rbx -Xint populate_queue.rb | |
[Thread debugging using libthread_db enabled] | |
Using host libthread_db library "/usr/lib/libthread_db.so.1". | |
y[New Thread 0x7ffff1290700 (LWP 26649)] | |
Connecting... | |
Starting threads... | |
[New Thread 0x7fffdb9db700 (LWP 26669)] | |
Signature mismatch | |
[# ] [ 1530/6142194] [ 0.02%] [00:03] [03:32:39] [ 481.27/s]Signature mismatch | |
[# ] [ 5090/6142194] [ 0.08%] [00:07] [02:33:18] [ 667.21/s]Signature mismatch |
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
Starting program: /home/yorickpeterse/.rubies/rbx-git/bin/ruby populate_queue.rb | |
[Thread debugging using libthread_db enabled] | |
Using host libthread_db library "/usr/lib/libthread_db.so.1". | |
[New Thread 0x7ffff1210700 (LWP 19395)] | |
[New Thread 0x7fffd37d7700 (LWP 19413)] | |
[New Thread 0x7fffd33d6700 (LWP 19414)] | |
[New Thread 0x7fffd0bcc700 (LWP 19424)] | |
[New Thread 0x7fffd0fcd700 (LWP 19423)] | |
[New Thread 0x7fffd13ce700 (LWP 19422)] | |
[New Thread 0x7fffd17cf700 (LWP 19421)] |
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
(gdb) r | |
Starting program: /home/yorickpeterse/.rubies/rbx-git/bin/ruby populate_queue.rb | |
[Thread debugging using libthread_db enabled] | |
Using host libthread_db library "/usr/lib/libthread_db.so.1". | |
[New Thread 0x7ffff1210700 (LWP 18501)] | |
Connecting... | |
Starting threads... | |
[New Thread 0x7fffd37d7700 (LWP 18522)] | |
[# ] [ 1950/6126420] [ 0.03%] [00:03] [03:18:47] [ 513.48/s]Signature mismatch | |
[# ] [ 4290/6126420] [ 0.07%] [00:06] [02:44:45] [ 619.29/s]Signature mismatch |
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
(gdb) r | |
Starting program: /home/yorickpeterse/.rubies/rbx-git/bin/ruby populate_queue.rb | |
[Thread debugging using libthread_db enabled] | |
Using host libthread_db library "/usr/lib/libthread_db.so.1". | |
[New Thread 0x7ffff1210700 (LWP 17222)] | |
Connecting... | |
Starting threads... | |
[New Thread 0x7fffd35ca700 (LWP 17246)] | |
[# ] [ 240/6126419] [ 0.00%] [00:01] [10:56:58] [ 155.41/s$ | |
[New Thread 0x7fffd21c5700 (LWP 17251)] |
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
Jul 17 14:28:19 [12843] command line: /home/yorickpeterse/.rubies/rbx-git/bin/ruby populate_queue.rb | |
Jul 17 14:28:19 [12843] node info: yorickpeterse-macbook-olery #1 SMP PREEMPT Tue Jun 23 14:25:08 CEST 2015 | |
Jul 17 14:28:19 [12843] process info: yorickpeterse rbx 12843 2.5.3.c208 2.1.0 2015-07-16 aa781419 3.5.2 JIT | |
Jul 17 14:28:21 [12843] <Warn> JIT: inline evaluator: compile error: push_block | |
Jul 17 14:28:21 [12843] <Warn> JIT: inline evaluator: compile error: push_block | |
Jul 17 14:28:22 [12843] <Warn> JIT: inline evaluator: compile error: push_block | |
Jul 17 14:28:22 [12843] <Warn> JIT: inline evaluator: compile error: push_block | |
Jul 17 14:28:22 [12843] <Warn> JIT: inline evaluator: compile error: push_block | |
Jul 17 14:28:22 [12843] <Warn> JIT: inline evaluator: compile error: push_block | |
Jul 17 14:28:22 [12843] <Warn> JIT: inline evaluator: compile error: push_block |