diegoviola has joined #rubinius
zacts has quit [Ping timeout: 272 seconds]
diegoviola has quit [Ping timeout: 258 seconds]
diegoviola has joined #rubinius
carlosgaldino has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dimday has joined #rubinius
diegovio1 has joined #rubinius
diegoviola has quit [Ping timeout: 250 seconds]
<|jemc|> hm, looks like my best shot for more performance out of this parser generator I need to implement the Test* set of instructions in the LPEG machine paper
diegovio1 is now known as diegoviola
houhoulis has joined #rubinius
|jemc| has quit [Ping timeout: 260 seconds]
diegovio1 has joined #rubinius
diegovio1 is now known as diegovio1a
johnmuhl has quit [Quit: Connection closed for inactivity]
amclain has joined #rubinius
arrubin has joined #rubinius
kagaro has quit [Ping timeout: 252 seconds]
josh-k_ has quit [Remote host closed the connection]
|jemc| has joined #rubinius
tenderlove has quit [Quit: Leaving...]
diegoviola has quit [Ping timeout: 255 seconds]
zacts has joined #rubinius
diegovio1a is now known as diegoviola
diegovio1 has joined #rubinius
arrubin has quit []
Bwild has joined #rubinius
diegoviola has quit [Quit: WeeChat 1.0.1]
havenwood has joined #rubinius
carlosgaldino has joined #rubinius
diegovio1 is now known as diegoviola
amclain_ has joined #rubinius
mrb_bk has quit [Ping timeout: 258 seconds]
mrb_bk has joined #rubinius
amclain has quit [Ping timeout: 258 seconds]
amclain_ is now known as amclain
meh` has quit [Ping timeout: 264 seconds]
diegoviola has quit [Quit: WeeChat 1.0.1]
meh` has joined #rubinius
noop has joined #rubinius
dzhulk has joined #rubinius
noop has quit [Ping timeout: 256 seconds]
diegoviola has joined #rubinius
havenwood has quit [Remote host closed the connection]
craigp has joined #rubinius
josh-k has joined #rubinius
josh-k has quit [Ping timeout: 250 seconds]
bennyklotz has joined #rubinius
diegoviola has quit [Quit: WeeChat 1.0.1]
JohnBat26 has joined #rubinius
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
craigp has quit [Remote host closed the connection]
craigp has joined #rubinius
|jemc| has quit [Ping timeout: 255 seconds]
JohnBat26 has joined #rubinius
pietr0 has quit [Quit: pietr0]
noop has joined #rubinius
dimday has quit [Remote host closed the connection]
flavio has joined #rubinius
flavio has joined #rubinius
amclain has quit [Quit: Leaving]
meh` has quit [Ping timeout: 264 seconds]
houhoulis has quit [Remote host closed the connection]
benlovell has joined #rubinius
lbianc has joined #rubinius
<yorickpeterse> morning
noop has quit [Quit: Leaving]
craigp is now known as drksvnt
noop has joined #rubinius
sferik has joined #rubinius
sferik has joined #rubinius
goyox86 has joined #rubinius
Bwild has quit [Quit: leaving]
josh-k has joined #rubinius
sferik has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
benlovell has quit [Ping timeout: 255 seconds]
sferik has joined #rubinius
sferik has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sferik has joined #rubinius
sferik has quit [Ping timeout: 250 seconds]
benlovell has joined #rubinius
benlovell has quit [Ping timeout: 264 seconds]
benlovell has joined #rubinius
sferik has joined #rubinius
meh` has joined #rubinius
sferik has quit [Quit: Textual IRC Client: www.textualapp.com]
sferik has joined #rubinius
houhoulis has joined #rubinius
meh` has quit [Ping timeout: 244 seconds]
enebo has joined #rubinius
drksvnt has quit [Remote host closed the connection]
drksvnt has joined #rubinius
houhoulis has quit [Remote host closed the connection]
drksvnt has quit [Remote host closed the connection]
drksvnt has joined #rubinius
drksvnt has quit [Remote host closed the connection]
drksvnt has joined #rubinius
drksvnt has quit [Remote host closed the connection]
drksvnt has joined #rubinius
drksvnt has quit [Remote host closed the connection]
houhoulis has joined #rubinius
josh-k_ has joined #rubinius
sferik has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
josh-k has quit [Ping timeout: 272 seconds]
drksvnt has joined #rubinius
lbianc has quit [Ping timeout: 255 seconds]
houhoulis has quit [Remote host closed the connection]
lbianc has joined #rubinius
houhoulis has joined #rubinius
houhoulis has quit [Remote host closed the connection]
drksvnt has quit []
tenderlove has joined #rubinius
lucasmartins has joined #rubinius
dreinull has quit [Remote host closed the connection]
<goyox86> Hey guys is there any way of Attaching with new Console to a running rbx VM?
<brixen> not yet :(
<brixen> soooooon :)
<goyox86> :)
dreinull has joined #rubinius
<yorickpeterse> exciting two weeks, moving stuff over to Postgres, _hopefully_ I can get a 2nd app on Rbx too
<brixen> yay postgres
<yorickpeterse> yay updating 20 applications because all our queries assume MySQL's shitty "type system" :P
<yorickpeterse> also planning the move from ActiveRecord -> Sequel
<brixen> so goyox86 suggested gitbook, which looks pretty nice, anyone used it? https://github.com/GitbookIO/gitbook
<brixen> example of a book using gitbook http://aturon.github.io/
<yorickpeterse> brixen: do you want to use this for actual book publishing?
<brixen> yorickpeterse: interested to hear about your experiences with Sequel
<brixen> yorickpeterse: for The Rubinius Book, yes
<yorickpeterse> wait there's a book coming out?
<brixen> yes
<yorickpeterse> :O
<goyox86> yorickpeterse: Aha surprised as me
<brixen> you're going to help write it :)
<yorickpeterse> "Rubinius The Good Parts"
<yorickpeterse> "1. It's not MRI"
<brixen> heh
<yorickpeterse> I haven't used it myself, I generally used Pandoc/Kramdown with custom stuff in the past
havenwood has joined #rubinius
<yorickpeterse> I worked with asciidoc or w/e it was in the past, which was ok-ish
<yorickpeterse> we used it for https://github.com/manveru/ramaze-book
<brixen> new post by sophia http://rubini.us/2014/12/08/rubinius-1-3/
<yorickpeterse> errr
<brixen> oh cool
<brixen> manveru used to hang out with us :(
<yorickpeterse> Yeah he's doing Go nowadays
<yorickpeterse> And regarding Sequel, so far it has treated me well, haven't tried it in production with Rbx yet though
<yorickpeterse> Though it's written by jeremyevans so I'm quite optimistic
<goyox86> been hearing good stuff about http://www.methods.co.nz/asciidoc/
<yorickpeterse> The lack of abuse of method_missing is already a plus
<yorickpeterse> I'm just not looking forward to ever updating our Rails apps to move away from AR
<yorickpeterse> I might just leave those at AR actually
P0w3r3d has joined #rubinius
<yorickpeterse> brixen: but so this book, would it be a general book about Rubinius, or would it cover certain specific topics?
<brixen> both
<yorickpeterse> That is, is it basically a documentation book, or does it look into say, how the JIT works?
<yorickpeterse> heh
P0w3r3d has quit [Client Quit]
P0w3r3d has joined #rubinius
<brixen> not sure if I like asciidoc over markdown though
<goyox86> This asciidoctor looks great :)
<brixen> asciidoctor is pretty cool demo of Opal too
<yorickpeterse> man, now that I think of it 2015 might be the year of "the Ruby server" for us
<yorickpeterse> Ideally no more MRI, only Rbx/JRuby
<yorickpeterse> (that is, a mix of the two)
<yorickpeterse> No more Mongo, only Pg
<yorickpeterse> and no more ActiveCrap
sferik has joined #rubinius
<yorickpeterse> oh and no more Nokogiri
<yorickpeterse> (lets not forget that)
<yorickpeterse> maybe then I can start programming instead of untangling this spaghetti
diegoviola has joined #rubinius
<yorickpeterse> It does depress me a bit when I think I wanted all this done almost a year ago
noop has quit [Quit: Leaving]
sferik has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<yorickpeterse> brixen: I guess we can write the book in LaTeX :D
<yorickpeterse> \begin{pain}
<brixen> yorickpeterse: noooo :p
sferik has joined #rubinius
<goyox86> yorickpeterse: I think PostScript/GhostScript are friendlier than LaTeX xD
<goyox86> Hey guys have you seen this: https://github.com/dirk/hivm
|jemc| has joined #rubinius
<yorickpeterse> hmm
<brixen> goyox86: neat
diegoviola has quit [Ping timeout: 260 seconds]
goyox86_ has joined #rubinius
sferik_ has joined #rubinius
goyox86 has quit [Ping timeout: 252 seconds]
sferik has quit [Read error: Connection reset by peer]
diegoviola has joined #rubinius
<jc00ke> I've heard good things about asciidoctor, worth a look
<jc00ke> I also like they list rbx as a supported Ruby ;)
sferik_ has quit [Quit: Textual IRC Client: www.textualapp.com]
diegoviola has quit [Ping timeout: 256 seconds]
diegovio1 has joined #rubinius
|jemc| has quit [Quit: WeeChat 1.0.1]
flavio has quit [Quit: WeeChat 1.0]
benlovell has quit [Ping timeout: 250 seconds]
pietr0 has joined #rubinius
dzhulk has quit [Quit: Leaving.]
amsi has joined #rubinius
|jemc| has joined #rubinius
diegovio1 is now known as diegoviola
goyox86_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
machete has quit [Ping timeout: 252 seconds]
goyox86 has joined #rubinius
machete has joined #rubinius
diegoviola has quit [Quit: WeeChat 1.0.1]
diegoviola has joined #rubinius
dzhulk has joined #rubinius
benlovell has joined #rubinius
benlovell has quit [Ping timeout: 264 seconds]
<yorickpeterse> brixen: what gcc version are you on?
josh-k_ has quit [Remote host closed the connection]
dzhulk has quit [Quit: Leaving.]
<|jemc|> oh wow
<|jemc|> spent all this time trying to optimize head fails
<|jemc|> and it turns out it was my set matching that was slow
<|jemc|> from head fail optimizations I squeezed out a ~10% speedup
<|jemc|> set matching was using find string
<|jemc|> now creates a Regexp with a character class and uses Regexp#match
<|jemc|> and parse times are now down from roughly ~20s to 0.1s
<|jemc|> oh wait, I knew it was too good to be true... I wasn't seeing that it's hitting a syntax error now >_<
<|jemc|> doh
<brixen> |jemc|: ouch :)
<brixen> |jemc|: I think that would be the definition of failing fast :)
<brixen> yorickpeterse: on my dev os x yosemite, I don't use gcc
<|jemc|> it looks like Regexp.escape isn't working how I thought it was supposed to...
<brixen> it probably doesn't work like anyone expects it to, but we're good at changing our expectations
<brixen> sometimes
<|jemc|> heh
<|jemc|> it looks like if I want a Regexp.escape that works how I expect, I'll have to write it by hand
<yorickpeterse> brixen: hmpf
<yorickpeterse> brixen: for https://github.com/rubinius/rubinius/issues/3235 / https://github.com/rubinius/rubinius/issues/3206 I suspect the option you added was either available since 4.8 or 4.9, hence the question
<|jemc|> yeah, there's results more like what I expected for creating and using a bunch of Regexps inline
<|jemc|> parse times roughly doubled rather than improving
josh-k has joined #rubinius
DanielVartanov_ has joined #rubinius
DanielVartanov_ has quit [Remote host closed the connection]
<brixen> yorickpeterse: I'll try to get the llvm-config stuff fixed today or tomorrow
meh` has joined #rubinius
<zacts> hi rubinius hackers
<yorickpeterse> brixen: ah ok
<yorickpeterse> yxhuvud: ping
<brixen> hi zacts
<|jemc|> brixen: goto_if_nil isn't behaving as expected for me - are there some "nil"s floating around out in the wild that do not == cNil?
chrisseaton_ has quit []
chrisseaton_ has joined #rubinius
chrisseaton_ is now known as chrisseaton
<|jemc|> specifically, the nil returned by String#find_string when it fails to find the substring is not triggering goto_if_nil for me
<brixen> |jemc|: could you code up a dynamic_method with a snippet of bytecode I can test?
<|jemc|> will do
<brixen> I'm guessing it's working correctly :)
<|jemc|> but there are no 'special' nils that do not equal cNil that you know of, then?
<brixen> nil is a singleton in Ruby
<|jemc|> heh, doesn't mean there isn't something more nuanced going on in rbx internals
<|jemc|> so it was just a sanity check
<|jemc|> writing the dynamic_method now
<brixen> true, but anything more nuanced would be a bug
<brixen> I have been tempted to make many nil values
<brixen> but in that case, the instruction would still need to work correctly
<brixen> on 64bit, I think we could technically support 288230376151711744 nils
<brixen> so if we used a different one at every cache that saw a nil, and did that monotonically, we could easily trace nil through a program
<brixen> neat
<|jemc|> heh
<yxhuvud> yorickpeterse: yo
<yorickpeterse> yxhuvud: how's your LL(1) parser-fu?
<yxhuvud> not very.
<yorickpeterse> hmpf
<yorickpeterse> I basically have a working parser and all that, but it gets stuck in a loop even though I expected for it to unwind automatically
<yorickpeterse> Ah no wait
<yorickpeterse> I think I actually have a FIRST/FIRST conflict
<yorickpeterse> hmmm
<yxhuvud> can you write code to test it?
<yxhuvud> s/test/detect
<yorickpeterse> "key_values = key_value | key_value T_COMMA key_values" is a first/first conflict I think
<yorickpeterse> since both branches start with T_STRING
<yorickpeterse> now that I think of it, I think I actually solved that somewhere in my notebook
<yorickpeterse> http://hackingoff.com/compilers/ll-1-parser-generator <- has been quite useful, though it doesn't detect conflicts sadly
<yxhuvud> refreshing to see such a simple parser.
<yorickpeterse> heh
lucasmartins has quit [Quit: lucasmartins]
<yxhuvud> oh well, I guess it is my own fault for choosing to implement something that has its parsing power screwed up to 11
amsi has quit [Ping timeout: 258 seconds]
amsi has joined #rubinius
<yorickpeterse> darn parsing theory using epsilon for nil/null values
<yorickpeterse> that character is impossible to type
<yxhuvud> indeed.
diegovio1 has joined #rubinius
diegoviola is now known as Guest95927
diegovio1 is now known as diegoviola
Guest95927 has quit [Ping timeout: 252 seconds]
<|jemc|> wow, this 20s parse run is taking for_ever_ with -Xint
Locke23rus has joined #rubinius
* |jemc| goes to get some lunch
Locke23rus has left #rubinius [#rubinius]
<|jemc|> oh it finished just in time (12 minutes, 45 seconds)
<|jemc|> speaking of just in time
<|jemc|> brixen: looks like it may be a JIT issue
<|jemc|> wasn't able to show the problem in a minimal dynamic method, but if I do -Xint my parser "works"
<|jemc|> I'll try a minimal dynamic_method in an infinite loop
<|jemc|> with and without jit
<brixen> |jemc|: sounds good
<brixen> I'm guessing it's a jit issue unrelated to goto_if_nil
goyox86 has quit [Read error: Connection reset by peer]
<brixen> |jemc|: also would be curious to see a slow interpreter case that is massively sped up by the JIT
<yorickpeterse> I have one app where I can see the JIT doing its thing in my graphs (at least I suspect that is the case)
<|jemc|> could be, although I injected a p(the_nil_value) bytecode right before the goto_if_nil check and it shows nil
<yorickpeterse> although I'd have to overlay JIT metrics on top of the timings graph to be sure
goyox86 has joined #rubinius
<|jemc|> re the app: pegleromyces is public code, you just need to install myco (from source) first
<|jemc|> when I'm done investigating this, I'll push up the latest few changes
<brixen> |jemc|: ok, a simple script to repro would o/~ awesome o/~
<brixen> I'm good at cloning repo's, etc, but that little bit of help goes a long way :)
<yorickpeterse> |jemc|: that name is impossible to pronounce
<|jemc|> to repro the massive jit speedup, you mean?
<brixen> |jemc|: you're welcome to take over pegarus if you want, and it has a twitter account, too
<brixen> |jemc|: yeah, to repro whatever
<|jemc|> brixen: I may take you up on that after pegleromyces is fast :)
<|jemc|> for those who want to reap the benefits o this work wihout having to install my toy language
josh-k_ has joined #rubinius
josh-k has quit [Ping timeout: 250 seconds]
<|jemc|> yorickpeterse: regarding the name - it's just a working title for the project right now - it'll probably end up getting integrated into myco at some point anyway
P0w3r3d has quit [Quit: Leaving]
<yorickpeterse> heh
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
<|jemc|> brixen: I have a minimal repro of the JIT issue (or at least, it reproduces faithfully and quickly on my machine)
<|jemc|> gisting now
<brixen> ok
<brixen> lol jit_debauchery_check
<|jemc|> (the BytecodeHelpers module at the top is just for inspecting values and debug printing)
<|jemc|> I'm running the 2.4.1 release
<|jemc|> I can file as an issue later tonight if you like
<brixen> this looks like nil every time I run it
<brixen> hm
<|jemc|> so your loop runs infinitely without raising?
<brixen> no, I mean your repro looks good
<|jemc|> ah
<yorickpeterse> yxhuvud: ok one more, how do parsers best handle epsilons? That is, say you have the rule "values -> pair more_values; more_values -> T_COMMA values | _;" with "_" being epsilon
<yorickpeterse> yxhuvud: right now I basically push epsilon on to the stack and for all non defined tokens my goto table jumps to an epsilon production
<yorickpeterse> which is basically a noop
<yorickpeterse> (if that makes any sense)
<brixen> |jemc|: I had a very simple test for this, rechecking that now
<yorickpeterse> yxhuvud: I think this is a hack, but I can't really think of another way
<|jemc|> yorickpeterse: pushing an epsilon token onto the end of the stack to mark EOF makes sense to me
<yorickpeterse> although the parser _seems_ to work correctly
<yorickpeterse> |jemc|: it's not EOF though
<yorickpeterse> more like end-of-current-production
<|jemc|> misunderstood then, nvm
<yorickpeterse> getting pretty darn close to figuring this out :D
<brixen> |jemc|: my test works and your repro shows an issue, fun :)
<yorickpeterse> then it's off to write a parser toolkit, a grammar, and a parser for that (and then bootstrap the whole pig)
<yorickpeterse> then it's writing a bunch of C/Java to make this webscale
<yorickpeterse> :<
<|jemc|> brixen: heh, fun indeed
<|jemc|> brixen: wish I knew enough about the JIT to be able to help out - it's on my list of things to eventually understand
<|jemc|> brixen: should we add some of these JIT regression tests to the rubinius repo somewhere?
<brixen> |jemc|: it's on my list to make it easier for you to understand :)
<|jemc|> great
<brixen> I'm working on a test framework for the JIT
<|jemc|> cool
<|jemc|> I imagine those two might come hand-in-hand
<yorickpeterse> By this point you'd be worried if brixen _wasn't_ working on something
<brixen> right, cus I'd be dead :)
<brixen> |jemc|: hm, your repro is interesting
<brixen> my test is testing a specific value
<brixen> either a straight up g.push :nil, or the argument passed in
<brixen> |jemc|: I'll gist you my test
<|jemc|> I was originally trying to isolate it like that, but ended up just going with a near-cut-and-paste of one of my parsing instructions
<|jemc|> it may be related to the primitive dispatches?
<|jemc|> (the primitives behind find_string and chr_at)
<|jemc|> I chose those methods because they were as close to the Rubinius.primitives as possible
<bennyklotz> yorickpeterse: gratz to your hand written LL parser, found any resources (other than wikipedia cryptic formulas) which helped?
<yorickpeterse> bennyklotz: about 2 dozen papers, Wikipedia, random websites, IRC and lots of note taking :P
<yorickpeterse> But I can say this: all academic resources I found fucking suck _unless_ you already are familiar with the algorithms (funny how that goes)
<|jemc|> brixen: in case you hadn't tried it yet: if you s/goto_if_nil/goto_if_false, the problem does not reproduce
<yorickpeterse> bennyklotz: http://en.wikipedia.org/wiki/LL_parser#Parser_implementation_in_Python this was most helpful to me, although that too is a bit confusing
<yorickpeterse> I still have to figure out how to run actions whenever a production is complete
<bennyklotz> yorickpeterse: okay thx, I think I'll just google for some papers and read them :)
<yorickpeterse> Once I've confirmed I didn't implement some weird thing I'll see if I can blag about this
<bennyklotz> okay cool :)
<yorickpeterse> bennyklotz: the Wikipedia page is probably easiest to read, the papers are a pain
<bennyklotz> kk thx
<brixen> |jemc|: yeah, I already tested that :)
<yxhuvud> yorickpeterse: I cheat by transforming the grammar to avoid epsilons. note that I havn't gotten the actual parse tree building to work yet, so actual handling in the generating stage is not known to me. You better ask someone that has finished a parser for that :)
<yorickpeterse> yxhuvud: hm, thanks
<brixen> |jemc|: heh, gets even more strange
<yxhuvud> or well, I *have* to rewrite productions that can lead to epsilons, but I have some epsilons in the state diagram. Those are handled by adding the state the transition lead to.
<yorickpeterse> yxhuvud: in this case I'm using epsilon as sort of a catch-all to break out of a productio n
<yorickpeterse> * production
<yxhuvud> I see.
<yorickpeterse> which I think can be done in a better way
<brixen> |jemc|: fixed
<brixen> |jemc|: silly me, I had planned to redo this with the fix and got distracted
GitHub129 has joined #rubinius
<GitHub129> [rubinius] brixen pushed 1 new commit to master: http://git.io/3RmT5Q
GitHub129 has left #rubinius [#rubinius]
<GitHub129> rubinius/master 033ec2d Brian Shirai: Fixed JIT for goto_if_nil, goto_if_not_nil.
<|jemc|> brixen: thanks
* |jemc| looks at the diff
<brixen> it's pretty simple
<brixen> the FALSE_MASK thing was the issue
<brixen> well, basically, masking to false and then comparing to nil
<brixen> that was silly
<brixen> if we want to use our millions of nils, we'd mask to primordial nil and compare
<brixen> but no reason to do that at the moment
<brixen> merging master to 1.8.7 branch and working through the vm/llvm files means I'm typing git and jit a bunch
<brixen> and since whatever I type my brain pronounces, even when I tell it to stfu, it gets pretty funny
<brixen> is git pronounced git or jit
<brixen> and then typing jit
<brixen> could be a college humor short about how to pronounce gif
<|jemc|> heh
goyox86 has quit [Max SendQ exceeded]
<|jemc|> that's why I use the long name for those instructions
<|jemc|> so that no one things I'm using a version control instruction
<|jemc|> or a peanut butter instruction that choosy moms would choose
goyox86 has joined #rubinius
<yorickpeterse> hmpf, I'd love for Ruby to basically have define_method but without the performance overhead
<|jemc|> yorickpeterse: where does the overhead come from (in rbx)? just the reseting of the method cache?
<yorickpeterse> actually perf is roughly the same in rbx when comparing def/define_method/eval
<yorickpeterse> hm, I think my benchmark is fucked
<yorickpeterse> MRI reports eval being faster than a regular def
<yorickpeterse> lol
<yorickpeterse> Ah ok better, define_method is ~1,25x slower compared to a def
<yorickpeterse> but in JRuby define_method is 2,45x slower compared to a def
<yorickpeterse> ^ why I stopped using define_method in Oga and switched to eval() in a few places
<|jemc|> yorickpeterse: 1,25x slower in rbx?
<yorickpeterse> No MRI
<|jemc|> ah
<|jemc|> yeah, if it was slower in rbx (after having some time to "settle in") I would be curious to know why
enebo has quit [Quit: enebo]
travis-ci has joined #rubinius
<travis-ci> rubinius/rubinius/master (033ec2d - Brian Shirai): http://travis-ci.org/rubinius/rubinius/builds/43530182: The build passed.
travis-ci has left #rubinius [#rubinius]
<yorickpeterse> wohoo, I sort of have an AST builder
<yorickpeterse> probably not very efficient but it's a nice start
<yorickpeterse> that would return `{"name"=>"Yorick", "age"=>22, "location"=>"Netherlands", "anger_level"=>9000}`
<|jemc|> well, I'm glad it's not *over 9000*
<yorickpeterse> semantics
<yorickpeterse> Right, so now that my parser actually does something it's 1,6 times slower than Racc
<chrisseaton> yorickpeterse: I like that you've labelled the rows and columns of your table - the one thing that most textbooks miss out and that makes it hard for students to understand in my experience
<yorickpeterse> chrisseaton: Yeah, it's quite confusing to remember what is what otherwise
<|jemc|> yorickpeterse: would it help your performance to turn your _rule_X methods into a big case statement?
<yorickpeterse> |jemc|: could be, although on at least rbx/jruby I'd expect them to be inlined (at least the short methods)
<yorickpeterse> lemme see what happens if I use a case
<yorickpeterse> wait first lemme see what rbx does
<yorickpeterse> Hm interesting
<yorickpeterse> so on MRI my LL parser is ~1,5x slower
<yorickpeterse> on Rbx it performs more or less the same as the Racc code, not sure if that's good or bad
<yorickpeterse> (slower than MRI though)
<yorickpeterse> and on JRuby my LL parser is 2,5x slower compared to Racc, but JRuby in general is faster than MRI
<chrisseaton> |jemc|: big switch statements are the enemies of many JITs - V8 and HotSpot both don't like them - not sure about LLVM
<yorickpeterse> either way, tomorrow I'll be looking into how painful it is to do part of this in Java/C++ (so I can bypass Ruby data structures) and then hook that up to Ruby
<|jemc|> chrisseaton: can you elaborate a bit for my edification? is it gotos in general or something special about switch/case?
goyox86 has quit [Read error: Connection reset by peer]
<chrisseaton> |jemc|: it's really the 'big' part - JITs often don't like big methods - and I think in particular some JITs actively stop compiling big switch statements as they consider them to be likely to not be well optimised (not saying it's a good heuristic - just that's the way it often is)
<chrisseaton> |jemc|: for example, if your JS function is too many characters (literally the number of caracters) V8 will not inline it - just based on that alone - regardless of how small it may compile to
<chrisseaton> |jemc|: actually I can give you a very concrete example - switch statements desugar into much more than a series of 'if's - often involving lookup arrays and things. In Truffle, we were not able to determine that one of these lookup arrays was constant, and so a switch was not compiling away. So there was a real bug from a switch causing a JIT to not work as
<chrisseaton> well as normal dispatch would.
<yorickpeterse> |jemc|: no noticable perf difference for a case vs method calls
<yorickpeterse> in MRI and Rbx