<travis-ci> jruby/jruby (packed_arrays:167ece8 by Charles Oliver Nutter): The build failed. (https://travis-ci.org/jruby/jruby/builds/136565079)
<GitHub25> [jruby] enebo pushed 2 new commits to master: https://git.io/vose9
<GitHub25> jruby/master 05fbfbb Thomas E. Enebo: Somehow this specialize instr is breaking spec:jrubyc? commenting out. will figure this out tomorrow
<GitHub25> jruby/master 36a0aae Thomas E. Enebo: Somehow this specialize instr is breaking spec:jrubyc? commenting out. will figure this out tomorrow
rueben_ has quit [Ping timeout: 250 seconds]
<GitHub120> [jruby] enebo pushed 1 new commit to master: https://git.io/vosvJ
<GitHub120> jruby/master 4d11849 Thomas E. Enebo: HEH. reenable new specialized instr. Our persistence is depending on these specialized operation enums :(
enebo has quit [Quit: enebo]
tjohnson has quit [Ping timeout: 264 seconds]
andrewvc has quit [Ping timeout: 264 seconds]
fidothe has quit [Ping timeout: 264 seconds]
andrewvc has joined #jruby
ekroon has quit [Ping timeout: 264 seconds]
deepak_ has quit [Ping timeout: 264 seconds]
tjohnson has joined #jruby
fidothe has joined #jruby
ekroon has joined #jruby
deepak_ has joined #jruby
keitaiz has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
yfeldblum has quit [Remote host closed the connection]
rcvalle has quit [Quit: rcvalle]
e_dub has quit [Read error: Connection reset by peer]
e_dub has joined #jruby
<travis-ci> jruby/jruby (master:1faa261 by Charles Oliver Nutter): The build is still failing. (https://travis-ci.org/jruby/jruby/builds/136576183)
thedarkone2 has quit [Ping timeout: 258 seconds]
thedarkone2 has joined #jruby
<GitHub1> [jruby] headius pushed 1 new commit to master: https://git.io/vosUn
<GitHub1> jruby/master 262ba3e Charles Oliver Nutter: Fix remaining Digest failures from MRI.
yfeldblum has joined #jruby
<GitHub131> [jruby] headius pushed 1 new commit to master: https://git.io/vosUd
<GitHub131> jruby/master b05f756 Charles Oliver Nutter: Add digest/bubblebabble to complete digest support.
<travis-ci> jruby/jruby (master:4d11849 by Thomas E. Enebo): The build is still failing. (https://travis-ci.org/jruby/jruby/builds/136579944)
keitaiz has joined #jruby
keitaiz has quit [Client Quit]
<travis-ci> jruby/jruby (master:262ba3e by Charles Oliver Nutter): The build failed. (https://travis-ci.org/jruby/jruby/builds/136586033)
keitaiz has joined #jruby
prasunanand has quit [Remote host closed the connection]
e_dub has quit [Ping timeout: 250 seconds]
e_dub has joined #jruby
tcrawley-away is now known as tcrawley
tcrawley is now known as tcrawley-away
skade has joined #jruby
skade has quit [Quit: Computer has gone to sleep.]
keitaiz has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
pawnbox has joined #jruby
pawnbox has quit [Remote host closed the connection]
keitaiz has joined #jruby
yfeldblum has quit [Remote host closed the connection]
keitaiz has quit [Client Quit]
keitaiz has joined #jruby
keitaiz has quit [Client Quit]
pawnbox has joined #jruby
pawnbox has quit [Remote host closed the connection]
skade has joined #jruby
pawnbox has joined #jruby
raeoks has joined #jruby
thedarkone2 has quit [Quit: thedarkone2]
skade has quit [Ping timeout: 240 seconds]
Antiarc has quit [Quit: No Ping reply in 180 seconds.]
Antiarc has joined #jruby
skade has joined #jruby
yfeldblum has joined #jruby
sandelius has joined #jruby
skade has quit [Ping timeout: 276 seconds]
<GitHub55> [jruby] petr-tichy opened issue #3962: Zlib::Deflate #deflate memory leak https://git.io/vosc6
keitaiz has joined #jruby
donV has joined #jruby
keitaiz has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
<GitHub32> [jruby] kares pushed 3 new commits to master: https://git.io/vosCy
<GitHub32> jruby/master 1b48756 kares: let's test an upgrade to jruby-openssl 0.9.16
<GitHub32> jruby/master 05ce271 kares: test out jruby-openssl 0.9.17 from staging
<GitHub32> jruby/master e976e38 kares: remove staging repo - use jruby-openssl 0.9.17 from RGs
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #jruby
prasunanand has joined #jruby
<travis-ci> jruby/jruby (master:e976e38 by kares): The build has errored. (https://travis-ci.org/jruby/jruby/builds/136621735)
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #jruby
tjohnson has quit [Quit: Connection closed for inactivity]
keitaiz has joined #jruby
keitaiz has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
pawnbox has quit [Remote host closed the connection]
brauliobo has joined #jruby
pawnbox has joined #jruby
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pawnbox_ has joined #jruby
pawnbox has quit [Ping timeout: 264 seconds]
vtunka has joined #jruby
pawnbox_ has quit [Remote host closed the connection]
sandelius has joined #jruby
pawnbox has joined #jruby
<GitHub199> [jruby] eregon pushed 2 new commits to master: https://git.io/vosux
<GitHub199> jruby/master 24aec9e Benoit Daloze: Update generated lib/pom.xml.
<GitHub199> jruby/master 1e435f7 Benoit Daloze: [Truffle] Fix compilation issue.
e_dub has quit [Ping timeout: 246 seconds]
donV has quit [Quit: donV]
<travis-ci> jruby/jruby (master:1e435f7 by Benoit Daloze): The build has errored. (https://travis-ci.org/jruby/jruby/builds/136639613)
donV has joined #jruby
pawnbox has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 250 seconds]
pawnbox has joined #jruby
donValentin has joined #jruby
donV has quit [Ping timeout: 272 seconds]
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sandelius has joined #jruby
raeoks has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
e_dub has joined #jruby
shellac has joined #jruby
sandelius has quit [Quit: Textual IRC Client: www.textualapp.com]
sandelius has joined #jruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #jruby
keitaiz has joined #jruby
keitaiz has quit [Client Quit]
tcrawley-away is now known as tcrawley
qba73 has joined #jruby
lance|afk is now known as lanceball
e_dub has quit [Ping timeout: 272 seconds]
pawnbox has quit [Quit: gotta go guys.]
raeoks has joined #jruby
pawnbox has joined #jruby
<GitHub95> [jruby] eregon pushed 1 new commit to master: https://git.io/voGv0
<GitHub95> jruby/master b43a285 Benoit Daloze: [Truffle] Fix misuses of transferToInterpreterAndInvalidate().
qba73 has quit [Quit: Leaving]
Aethenelle has joined #jruby
<GitHub132> [jruby] eregon pushed 1 new commit to master: https://git.io/voGvN
<GitHub132> jruby/master 0940631 Benoit Daloze: [Truffle] Use transferToInterpreter when updating the Shape for now.
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sandelius has joined #jruby
<GitHub48> [jruby] chrisseaton pushed 1 new commit to truffle-head: https://git.io/voGUC
<GitHub48> jruby/truffle-head 49f905c Chris Seaton: Merge branch 'master' into truffle-head
Aethenelle has quit [Quit: Aethenelle]
donValentin has quit [Ping timeout: 240 seconds]
<travis-ci> jruby/jruby (master:1e435f7 by Benoit Daloze): The build failed. (https://travis-ci.org/jruby/jruby/builds/136639613)
raeoks has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
thedarkone2 has joined #jruby
subbu is now known as subbu|away
enebo has joined #jruby
sandelius has quit [Quit: Textual IRC Client: www.textualapp.com]
<travis-ci> jruby/jruby (master:b43a285 by Benoit Daloze): The build failed. (https://travis-ci.org/jruby/jruby/builds/136699762)
oblutak has joined #jruby
<GitHub136> [jruby] enebo pushed 1 new commit to master: https://git.io/voGOB
<GitHub136> jruby/master 444c2d6 Thomas E. Enebo: Double fault. Fixed infinite loop if fixnum call instr but canot be emited by JIT specially as fixnum call
Aethenelle has joined #jruby
donV has joined #jruby
<GitHub197> [jruby] eregon pushed 1 new commit to master: https://git.io/voGso
<GitHub197> jruby/master cd36d12 Benoit Daloze: [Truffle] Remove unused specializations when going to Object to read/write local vars.
<travis-ci> jruby/jruby (master:0940631 by Benoit Daloze): The build failed. (https://travis-ci.org/jruby/jruby/builds/136701023)
keitaiz has joined #jruby
keitaiz has quit [Client Quit]
pawnbox has quit [Remote host closed the connection]
hobodave has joined #jruby
pawnbox has joined #jruby
<kares_> hey!
<kares_> q: does JRuby GC symbols or not?
<kares_> there seems to be an assumption through the codebase that RubySymbol only == if its the same instance
<lopex> it uses weak refs in the table
rueben_ has joined #jruby
<GitHub0> [jruby] headius pushed 1 new commit to packed_arrays: https://git.io/voG8X
<GitHub0> jruby/packed_arrays d0c42df Charles Oliver Nutter: Merge remote-tracking branch 'origin/master' into packed_arrays
donV has quit [Read error: Connection reset by peer]
donV has joined #jruby
vtunka has quit [Quit: Leaving]
<travis-ci> jruby/jruby (master:444c2d6 by Thomas E. Enebo): The build was fixed. (https://travis-ci.org/jruby/jruby/builds/136718731)
raeoks has joined #jruby
keitaiz has joined #jruby
<keitaiz> Just for the record headius helped me out with the power of --sample
keitaiz has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
subbu|away is now known as subbu
<travis-ci> jruby/jruby (master:cd36d12 by Benoit Daloze): The build was fixed. (https://travis-ci.org/jruby/jruby/builds/136722444)
shellac has quit [Quit: Leaving]
donV has quit [Quit: donV]
rcvalle has joined #jruby
<GitHub15> [jruby] headius closed issue #3398: Performance bug with JDBC/sqlite driver under multi-threaded conditions https://git.io/vCDcD
<kares_> lopex: should have checked ... thanks
<lopex> kares_: also all the constructors are private
SynrG has joined #jruby
<travis-ci> jruby/jruby (packed_arrays:d0c42df by Charles Oliver Nutter): The build failed. (https://travis-ci.org/jruby/jruby/builds/136735605)
norc has joined #jruby
<GitHub148> [jruby] headius pushed 1 new commit to packed_arrays: https://git.io/voGwj
<GitHub148> jruby/packed_arrays 23a92fa Charles Oliver Nutter: Soften this check even more, since packed arys are in diff package
donV has joined #jruby
subbu is now known as subbu|lunch
<headius> ziggy piggy
<headius> kares_: we may want to audit such cases, but I don't think they can fail
<headius> if you have the symbol in hand, it should still be in the symbol table
<headius> if you don't, you have to go through the symbol table
<headius> jruby itself should be guaranteeing there's never two objects for the same symbol in flight at the same time
<lopex> if would have to be uncontrolled leak from RubySymbol itself
<lopex> (leak of non interned symbols)
<lopex> er, non tableized
<lopex> lol
<lopex> headius: it came to my mind that that match used flag was never used
<headius> it wasn't?
<lopex> headius: it's some mri remnant
<lopex> or, wait actually
<headius> I thought we did use it
<headius> to know if the MatchData was seen so we could reuse it
<headius> I don't know if it worked :-)
<lopex> oh it is
<lopex> for some reason I thought we got rid of it
<travis-ci> jruby/jruby (packed_arrays:23a92fa by Charles Oliver Nutter): The build was fixed. (https://travis-ci.org/jruby/jruby/builds/136754686)
<lopex> headius: hmm it doesnt make sense to me
<lopex> headius: the used just makes it so it isnt reused
<lopex> oh well, match data can always escape so it cant be reused anyways
<lopex> headius: do you see RubyRegexp.search19 ?
<lopex> yeah is the getBackRef that marks it
<lopex> *its
<headius> right
<headius> when I re-ported MRI stuff I wasn't sure about those flags, so they might not be working now
<headius> I also rejiggered the whole search/match call chain at one point to allow doing searches/matches with no MatchData at all
<headius> for internal uses
<lopex> I recall now is works just the same way in mri
<GitHub148> [jruby] enebo reopened issue #3946: warning: Ambiguous first argument https://git.io/vrbsK
<lopex> headius: wrt those flags hows the proposed memory model?
<lopex> headius: do you need atomic flip in any place ?
bga57 has joined #jruby
yfeldblum has joined #jruby
subbu|lunch is now known as subbu
bruceadams has quit [Ping timeout: 276 seconds]
bruceadams has joined #jruby
bruceadams has quit [Changing host]
bruceadams has joined #jruby
halorgium has quit [Ping timeout: 260 seconds]
halorgium has joined #jruby
yfeldblum has quit [Ping timeout: 250 seconds]
donV has quit [Quit: donV]
<cremes> headius: ping
<headius> cremes: yo, sup
<cremes> trying to build sqlite-jdbc from source on my box.
<headius> yeah I thought of that after I asked...Windows may be trickier
<cremes> only need ti for osx
<cremes> to test anyway
<headius> oh! no problem then!
<headius> I should have posted a binary somewhere, sorry about that
<headius> I thought xerial would get a release out sooner than this
<cremes> it’s telling me “mvn: No such file or directory” is that some maven package that I need to install?
<headius> that is maven itself
<cremes> i see brew has it… should I install that to get it to work?
<headius> that should work
<cremes> trying...
<headius> or download tarball and put in PATH
<cremes> wow, something is definitely happening
<cremes> so I have sqlite-jdbc-3.9.1-SNAPSHOT.jar now
<cremes> should I just drop that into my existing gem?
<headius> yup
<cremes> will do
<headius> make it match gem's filename
<cremes> testing shortly…
<cremes> ok
<headius> the jar in the gem that is
<headius> it would help our case to get a user report that it's working well
<headius> so thank you for trying it
<cremes> give me 20m to bang on this and I’ll be back :)
<headius> excellent
prasunanand has quit [Remote host closed the connection]
donV has joined #jruby
<cremes> sheesh, I have no luck at all. Just ran into this bug: https://github.com/jruby/jruby/issues/3945
<cremes> working around it though...
<headius> huh, recent one
<headius> guess we should prioritize that then
<cremes> headius: I think we have a winner. It’s working for me much much faster. Maybe 5x faster with that patch.
<headius> excellent!
<headius> what's the job you're running?
<headius> this might help a lot of JRuby on Rails devs out
<cremes> I rewrote some of my parsing scripts from last year to use celluloid to parse and load the data into the DBs.
<headius> at least for local development...hopefully nobody uses sqlite3 in production
donV has quit [Quit: donV]
<headius> oh nice
<headius> so you're burning up the cores too
<cremes> takes MRI about 7 hours and jruby just under 9 hours even though jruby was WAY faster on some of the early parsing steps.
<cremes> Yeah, running 700+%
<headius> schweet
<headius> at that rate there might even be some gain from GC tweaks
<cremes> +1
<headius> but if we can be 5x faster we'll be down to about 2 hours eh?
<cremes> yeah, the heap in jruby got up to around 35GB or so while MRI stayed down around 20GB
<cremes> maybe… hard to say from that one benchmark.
<cremes> i’ll rerun tomorrow to measure it. in the meantime, I need to measure the rbx runtime. unfortunately it’s way way up there (17+ hours).
<headius> we've been working on memory improvements
<cremes> I’m keeping this patch loaded for my sqlite-jdbc gem :)
<cremes> that’s good
<headius> I've got some patches that reduce the size of small (1-2 element) arrays by 50-60% in memory
<headius> are you on 9.1.2?
<cremes> i’m cheating with this process. I read entire files (500MB) into memory to build hashes and then write those hashes back out to disk.
<cremes> it puts a lot of pressure on the GC
<cremes> yes, 9.1.2.0
<cremes> it makes my heart sing when I see all cores lit and running hot
<headius> ahh, I haven't started specializing Hash, but I plan to have some packed versions of that too
<headius> small hashes?
<headius> we do some minimal packing for literal hashes that are small enough, but it basically just forces them into one bucket
<headius> the hash nodes are still too big
<cremes> no, very large hashes
<cremes> tens of thousands of keys
<headius> ok, then best we could do would be lighter-weight internals of Hash
<headius> tricky
<headius> insertion ordering adds 8 or more bytes to every entry
<cremes> yeah, I don’t care about insertion order. ordered hashes just seem wrong to me anyway. :)
<headius> I wouldn't expect ours to take *too* much more than MRI's, but JVM objects do have bigger headers
<headius> if you don't care you could use something from concurrent-ruby
<headius> there's at least one non-ordered concurrent hash impls
<cremes> I don’t want or need to pay the concurrency overhead. Just need a straight-up unordered and fast hash.
raeoks has quit [Quit: Textual IRC Client: www.textualapp.com]
<cremes> wish ruby had one in stdlib :)
<headius> well thankfully there's a whole team of folks (several from JRuby) that work on concurrent-ruby
<headius> we're trying to make Ruby better
<headius> the concurrency overhead probably wouldn't be big issue
<headius> cremes: I thought you were a fan of having no stdlib :-P
<headius> lopex:
<headius> lopex: I just realized we could use high bytes of String to store up to two bytes of character
<headius> that could cut down overhead/memory for e.g. parsers a ton
<headius> hmm...though we do already pool all single-byte strings
<cremes> headius: almost… I’m a fan of a better stdlib. it’s terrible that ruby’s stdlib has so many atrocious examples of ruby code.
<headius> oh but they have to be mutable
<headius> cremes: such as?
<cremes> remember the CSV performance bug I reported last year. good example.
<lopex> headius: why only two ?
<headius> cremes: well, I don't like that pattern particularly but it's not surprising that they used it
<cremes> headius: pretty much everytihing in Date is pretty ugly
<headius> lopex: well maybe three
<headius> I don't know how many flags we have at RubyString level
<headius> yeah three I guess
<lopex> headius: ah, single byte strings
<cremes> there could/should be a project just to rewrite & refactor stdlib classes into better and more readable ruby
<headius> so many MBC single-char strings could be reduced
<lopex> headius: jeez, at firts I though you want to mebed something in last chars of the string
<lopex> lolz
<headius> hah
<headius> no not that :-)
<lopex> also doable :)
<headius> I'm working on object packing right now so I'm thinking about this
<headius> we need to have small packed versions of String, Array, and Hash
<headius> larger ones can just use current logic
<lopex> headius: so same scheme as mri in general but on lower scale ?
<headius> yeah
<headius> RubyArrayOneObject still has the cost of the values field, but it does not have to create IRubyObject[]
<lopex> headius: in those cases I wonder how it would affect memory steady state perf
<headius> 60% memory size reduction for that
<lopex> headius: those calcs
<headius> what do you mean?
<lopex> head but those are really fast and not memory bound though
<headius> cremes: MRI rewrote date in C though
<headius> ours is still Ruby but we use some JVM utilities
<lopex> headius: like in packed arrays (you get an extra branch everywhere)
<headius> cremes: I agree in general that there's improvements to be had, but I don't see how pulling the stdlib out into gems helps anything
<headius> lopex: only in the packed impls
<lopex> headius: but if half of those paths go to allocation then I guess it doesn matter right ?
<headius> if you're working with a non-packed impl from the beginning it's just like it is now
<headius> also, I realized I didn't even need a flag for this... I can indicate packed/unpacked by whether values array is null
<lopex> yes
<cremes> headius: i’m not going to argue about pulling stdlib into gems. that’s all been said. the ruby code left in stdlib is almost uniformly bad.
<headius> so checking if it's still packed is just a field lookup and null check
<lopex> the nullarray right ?
<cremes> headius: and rewriting Date in C is no mark in its favor. :(
<headius> cremes: well, we rewrote it in better Ruby :-)
<lopex> headius: maybe it should be preinited with null aray ?
<headius> we're trying to improve stdlib too
<cremes> headius: good, we need more of that!
<lopex> er NULL_ARRAY
pitr-ch has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<headius> lopex: but that's a valid value for unpacked array
<headius> null is better
<headius> or some other sigil
<lopex> headius: hmm, wrt that string
<lopex> headius: what about extending the flags to long ?
<lopex> headius: or add additional int to RubyString
<headius> if another 4 bytes on every object isn't a big deal, then it would work well
<lopex> hm
<headius> that would cover all MBC chars except the weirdest combinators
<lopex> yeah
<headius> you could parse anything without creating a byte[] for every char then
<lopex> headius: but worth polluting 64 for all objects
<headius> hell, no ByteList or byte[]!
<headius> it could be enormous
<lopex> headius: yeah, part of that was that two level cow thingy
<headius> and have the same unpacking semantics as Array...modify it outside that number of bytes, and it unpacks and goes to old logic
<headius> but most single-char strings probably NEVER changes
<lopex> headius: share whole buffer or only the byte[]
<headius> yeah I go back and forth on that :-(
<headius> ByteList is a good abstraction, but the extra layer sucks
<headius> we need value types
<lopex> headius: yeah same here
<lopex> wrt that cow
<headius> cremes: are you doing a full run? I'd love to hear how much this reduced your run time
<lopex> headius: so an int in basic object plus and int in string or long in basic object ?
<cremes> headius: yes, doing one now
<cremes> i’ll ping you when it completes
<headius> awesome
<headius> and tell @xerial how much better it is on that bug, so he has more than just my enthusiastic comments :-)
<headius> lopex: that's a good idea too
<enebo> cremes: headius it will also point out that one guys bench of JRuby itself is not right
<headius> this could also be a subclass like the array stuff
<headius> then we could have any number of bytes packed directly into the object
<headius> up to diminishing returns
<headius> enebo: which?
<enebo> headius: that guy shows 17x faster in Java but the Ruby stuff was not much different
<headius> lopex: I managed to isolate what needed to be overridden down to about 200 lines of code for RubyArrayOneObject
<headius> I call that pretty good
<enebo> headius: although he did not qualify how many cores he used for the ruby test
<headius> enebo: what guy?
<enebo> headius: the guy who benched in the issue you asked cremes to comment in
<enebo> headius: he did Java and Ruby test
<enebo> headius: The ruby test showed no improvement
<headius> oh
<headius> oh right that guy
<headius> he came back later and had something that did show improvement in JRuby, I think
<headius> in any case, this is an obvious win
<enebo> headius: his second post was a Java benchmark
<headius> ahh right
<lopex> headius: arent you affraid of megamorphizing of too many methods ?
<cremes> headius, enebo: I’ll make a post in that issue when my latest run completes and I see how much time it shaved off.
<enebo> cremes: cool. Finally you can run your db without a synchronous lock
<headius> yeah I don't know why he didn't see any improvement on JRuby
<cremes> I’ll take a real-world use-case over a synthetic benchmark anyway :)
<headius> his script looks like it's concurrent but he uses tabs to indent so I can't read a bloody thing
<cremes> if you guys watch Silicon Valley on HBO they just did a hilarious riff on tabs-vs-spaces in an episode 2-3 weeks ago
pitr-ch has joined #jruby
<cremes> guy dumped his girlfriend because she preferred spaces and he preferred tabs
<cremes> ridiculous but funny
* cremes or is it ridiculous?
<headius> lopex: well that will require some thought
<headius> we can count on bimorphic inlining on hotspot, so having two subclasses shouldn't be a big problem
<headius> beyond that we'd have to see
<headius> and try to keep the base unpacked logic as monomorphic as possible
<headius> cremes: seems legit
<lopex> you can trade that on branching that in the IR
<headius> lopex: right, that's always an option...branches in the parent versus polymorphic dispatch
<lopex> but the interpreter would also require that
<headius> I think the win of not traversing extra objects and memory size are going to be big enough wins though
rueben_ has quit [Ping timeout: 240 seconds]
<lopex> headius: like traversing by gc ?
<headius> traversing by us... RubyArray => IRubyObject[] => obj or RubyString => ByteList => byte[] => byte
<headius> those all get reduced to one field lookup
<headius> cache locality etc
<lopex> or, by means of indireting
<lopex> *indirecting
<headius> right
* lopex for some reason thinks treverse has something to do with iteration
<headius> so we may introduce more complexity into the hierarchy but my hope is that the gains more than offset that
<headius> worst case we do *one* subclass for each packed type that has N fields and logic to use them
<lopex> howe does truffle deal with that ?
<headius> truffle provides a DynamicObject that adapts to the shape you give it
<headius> so all their objects just look like this weird magic struct
<headius> pretty elegant, but it has down sides obviously
<lopex> er
<lopex> I mean
<lopex> hmm, yeah they can do anything
<chrisseaton> well it all has to work on a stock JVM as well
<chrisseaton> so we can't do custom object layout, or custom GC or things like that
hobodave_ has joined #jruby
<lopex> but I mean you can have shape profiled on a single char string going on the path
<lopex> so you can specjalize on it
<lopex> chrisseaton: do you have single char specializations ?
<chrisseaton> for strings, yeah, all 255 single char strings are interned I think
<lopex> interned or treated as an int in memory essentially ?
hobodave has quit [Ping timeout: 260 seconds]
<chrisseaton> string data is shared, and the data is interned as a byte[1]
<lopex> oh
<lopex> but you can specjalize on shapes right ?
<chrisseaton> yeah, that's key
<lopex> jeez that j from polish
<headius> 9.1 already added minimal object shaping up to ten ivars...that could be expanded
<headius> and probably should be generated
<headius> but yeah, if we do this for String, Array, and Hash, I think we'll see some really nice memory improvements
<headius> I'm trying to finish up two-object Array now
<chrisseaton> I think I default object is pretty huge - we should have one for objects that I expect to not have any fields
<chrisseaton> There's not sense allocating a String with space for four ivars
e_dub has joined #jruby
tcrawley is now known as tcrawley-away
<lopex> headius: does jruby exploit any of the frozen immediates in mri 2.x feature yet ?
<lopex> I wonder when mri will go for "no ivars for builtins"
<chrisseaton> I'll be very sad if they achieve 3x by 3.0 by removing features like that
<lopex> yeah, that's just omitting some fields in their structs and removing some checks
<lopex> not enough
<chrisseaton> I can imagine someone adding a JIT where it does things like ignore monkey patching in compiled code, and claiming it's a feature
<lopex> like crystal ?
<lopex> oh, that;'s not a jit
<chrisseaton> crystal is a great project... but yeah like that
<headius> lopex: most of the key builtins are frozen now anyway
<chrisseaton> Crystal could benefit from a JIT as it still has virtual dispatch
<lopex> the fist project like that I saw was scriptol
<headius> Crystal could benefit from a real VM
<headius> I'd wager that Crystal on JVM would smoke their LLVM version
<lopex> headius: but that's just semantics changes
<lopex> the whole thing is just an appeal to syntax
<headius> well, I'm more talking about how they have a crappy GC and no parallelism right now and they say "we'll add that later"
<lopex> or I'am wrong
<headius> history has shown it's pretty damn hard to "just add" parallelism to a runtime after the fact
<headius> lopex: you're not wrong
<lopex> and pretty hard to bootstrap when you only have a semantics
<headius> it's basically Mirah but with full type inference
<lopex> concurrency is hard in mutable world
<lopex> you need to make hard choices
<chrisseaton> I should be trying Crystal on Sulong
<chrisseaton> Did someone write a Ruby C extension in Crystal - am I remembering that correctly?
<lopex> any llvm on sulong
<havenwood> chrisseaton: Yeah, they have an example on in the crystal repo. I embedded mruby in a crystal extension just for fun, to take the inception one deeper.
<lopex> hah
<lopex> cool
<lopex> mruby api is so much better than mri
<lopex> and at least you have a context
<lopex> actually is mruby adoption a thing yet ?
<havenwood> hmm, can't find the example gem ext in crystal repo, did find this: https://gist.github.com/notozeki/7159a9d9ab9707a22129
<headius> mruby's doing a lot these days
<headius> not sure if any of it is more than a toy though
<headius> chrisseaton: Crystal on Sulong would be interesting since it's managed
<headius> I wonder how well Sulong could run Boehm :-D
<chrisseaton> Maybe we could intercept their allocations and use the JVM's
<havenwood> here's mruby in crystal just for fun (a wild stab at it from a while back): https://gist.github.com/havenwood/afc514180e9aa18caaf2
<cremes> headius: holy shit holy shit holy shit. it just finished in 60m flat. Run went from 8 hours 50m to 1 hour even.
<enebo> cremes: yay
<enebo> cremes: give us some other profiling so we can keep lowering it :P
<havenwood> ahh, this was the Ruby ext in Crystal PoC i was thinking of: https://github.com/manastech/crystal_ruby
<chrisseaton> thanks
<havenwood> jhass in #crystal-lang also pointed me to: https://github.com/phoffer/crystalized_ruby
<cremes> enebo: ha. not sure it would even register on a profiler now… the DB part of the run was so fast…
<enebo> cremes: how big is that box?
<enebo> cremes: you must have 8 cores at least?
<cremes> 8 cores and 46GB RAM allocated to this VM. all IO is to SSDs also.
<enebo> cremes: I guess I am just guessing based on how big removing a lock did
<enebo> ok so proping Array literals is quite a bit more difficult than I had hoped
<enebo> when we build something like lasgn we return the value
<enebo> and not the variable
<enebo> but if I prop array then the lvar returns the array itself and not a temp var
<enebo> so we get this situation where a call may just use the array as an argument
<enebo> so we end up duplicated the same literal array
<enebo> To making fixing this simple I think I would need to propagate whether something was involved in assignments higher up in the AST chain and then use a tempvar + copy in those cases
pitr-ch has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<headius> cremes: oh man, that's excellent
<headius> JRuby wins again!
<headius> so 7x faster than MRI
<cremes> headius: yep
<headius> well that makes my day :-)
<cremes> it freaked me out. I thought something went wrong!
<cremes> but yes, it makes my day too
<headius> hopefully we can start to whittle away the heap size with some of these improvements
<headius> hoping to land my small object specializations for 9.1.3
<headius> cremes: well keep your issues coming...you're a good use case for us to make improvements :-)
<cremes> headius: will do. sometimes I’m surprised that I run into these issues and no one else does. Honestly I think that most folks just don’t open issues. Oh well.
<cremes> I’ll find another juicy one for you soon.
<headius> that's probably true
<headius> or they're running mostly-isolated threads that never see each other
<headius> like for a webapp
<cremes> maybe
hobodave_ has quit [Quit: Computer has gone to sleep.]
<cremes> I probably have another juicy perf issue in this same use-case. I’ll just have to dig it out.
<enebo> who uses sqlite3 in production though?
<headius> might be interesting to throw some profiling at it now and see what is the top item
<cremes> there was a slow part (phase 2) that took about 50m.
<headius> --sample is probably the simplest one
<enebo> cremes: your use case is less common I think in that regard
pitr-ch has joined #jruby
<cremes> enebo: that’s probably true too
<enebo> cremes: and so I remember…you use it because you make lots of separate dbs?
<headius> you're using sequel...it probably wouldn't be hard to switch to one of the embedded JVM databases
<headius> they're darn quick and don't require any native libs
<headius> and they're ACID, if you care about that
<headius> I'd be surprised if sqlite3 is does any of those
<headius> well...efficiently anyway
<cremes> enebo: correct, lots of separate DBs. I don’t want every little write/update to trigger a backup of a single 300GB file. I’d prefer 100 3GB files (or whatever).
<cremes> headius: I haven’t switched DBs because I don’t want to learn Yet Another DB’s quirks.
<cremes> i’m comfortable with the sqlite3 repl.
<cremes> I did play with H2 a long time ago though.
<enebo> cremes: thanks…that’s what I remembered
<cremes> regardless, I want to thank headius for acting like a dog with a bone and staying on top of that issue all of these months. It’s fixed and I’m happy!
<jeremyevans> cremes: One thing to keep in mind is jdbc-sqlite doesn't even half-support date/time type conversion, date/time column values are always returned as strings
cprice404 has quit [Remote host closed the connection]
<cremes> jeremyevans: yep, I am well aware. That’s okay for my use-case.
<cremes> jeremyevans: while you are here, let me thank you for a great project in sequel.
<cremes> I remember interacting with the original author way back when… was his/her name Sharon?
<cremes> anyway, great project. my “go to” for all DB handling.
<headius> cremes: I'm glad it turned out to be so simple
<headius> now we just need to get them to release it
<cremes> haha, yeah. i updated that ticket so hopefully that will light a fire.
<headius> great, thanks
<cremes> headius: you haven’t posted to your blog in a while. It might be useful to bring everyone up to speed on the 9k update, new performance stuff in the pipeline, etc. I don’t have nearly the time to lurk in IRC like I used to so I know I miss out on a lot of the scuttlebutt.
<headius> yeah I'm going to do some posts soon about the work from this week
<headius> binary interpreter, object specialization
<cremes> cool. looking forward to it.
<GitHub67> [jruby] headius pushed 1 new commit to packed_arrays: https://git.io/voZqS
<GitHub67> jruby/packed_arrays a83428f Charles Oliver Nutter: Add file, line to calls in JIT, for logging and debugging.
<headius> enebo: have you landed any of your IR improvements yet?
pitr-ch has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<enebo> headius: yes
<headius> are you interested in hearing about copy instrs that remain?
<lopex> numbers ?
<enebo> headius: the false edges + subbu landing temp inits, sand copy reduction
<headius> oh, this is copy to heap though
<headius> I guess those can't be reduced
<enebo> I ran into an issue with Array literal copy reduction
<enebo> I think builder will need to change substantially to address it
<enebo> individual built nodes need more knowledge of their parents to fix it
<subbu> worth figuring out what it will give you before doing a lot of changes.
<enebo> subbu: well atm it will only give us copy removal of Array
<enebo> subbu: probably also for Hash
<enebo> in my case of gem list I remove 11k array copys of 81k instrs total
<subbu> but, i mean ... hotspot can handle those kind of simple global copy proagation .. the qn. is how many instrs. will be removed to push the scope below the hotspot inlining/opt. threshold.
<enebo> so it is not a small number in that particular use case
<enebo> subbu: well I guess that depends on the program right?
<headius> lopex: Array could pack begin or size into flags if it were long
<subbu> ya
<enebo> subbu: some programs will get pushed below and threshold and some won't
<headius> or both with a flag to say whether to look there
<headius> e,g. if they're both under X bytes
<enebo> subbu: I am not saying all copy’s are bad and we should trade-off impl complexity vs reward
<enebo> subbu: but I think the smaller our programs are the better startup time and memory should get
<enebo> subbu: or pining data in temp vars
<enebo> subbu: or hotspot threshold checks
<subbu> right.
<enebo> with all that said I do not have a concrete answer on what is worth it
<lopex> headius: but now it's in mri thinking territory
<enebo> I just realized why one spec failed quite recently
<headius> I'd like to get more explicit instructions for using frame/scope too so we might be able to have those optimize away rather than all these nasty flags
<headius> i.e. we might have a CallWithFrame that explicitly consumes frame, and then don't have to look at what it's calling to know if frame can DCE away
<headius> lopex: well, the old tricks are the best tricks
<headius> and header-packing is nothing new
<travis-ci> monkstone/jruby (master:2d2c230 by monkstone): The build passed. (https://travis-ci.org/monkstone/jruby/builds/136800880)
<headius> gah
<headius> travis needs a better way to set up IRC notifications
<headius> I hate the idea of people having to patch their fork for that
<headius> asarih: do you know of any way to limit IRC notifications to just pushes on jruby/jruby?
<subbu> headius, but, you cannot add those instrs. at the call site without knowing the call target.
<subbu> the target scope has explicit push/pop of scope & frame in the entry bb right now.
<lopex> headius: if it could pack begin + size that would be something
<headius> yeah
<subbu> i mean push/pop in entry/exits
<headius> arrays > 16 bits of size have to be pretty damn rare
<lopex> but you need a check for that then
<headius> subbu: right, but I mean at build time we'd say "ok, this is a frame-consuming call" and make a CallWithFrame
yfeldblum has joined #jruby
<subbu> but, how do you know that?
<enebo> headius: you mean native calls?
<headius> we only do it based on name now anyway
<headius> but it's done during flags calculation
<headius> enebo: yeah native calls that need frame
<headius> I'm not saying we do any more than name-based guessing about frame, but make it explicit in the instruction that the frame is used
<enebo> so if we are in a method scope and we call block_given?
<headius> yeah, stuff like that
hobodave has joined #jruby
e_dub has quit [Read error: Connection reset by peer]
<headius> block_given would depend on frame, so frame creation would not DCE
johnsonch is now known as johnsonch_afk
e_dub has joined #jruby
<headius> dunno, maybe it's just moving the deck chairs around to let DCE remove frame versus never adding it
<enebo> headius: but this would be for a very small number of methods right?
<enebo> headius: like 12 or so
<headius> yes
<enebo> if that
<lopex> headius: hmm, so as with that flags you'll need a framework for dealing with thresholds
<headius> this would also help us eliminate useless loads of module and staticScope
<headius> because we'd say which instructions explicitly need them
<enebo> headius: do we add a flag to IRScope for that?
<headius> we wouldn't need it to be in flags
<headius> ACP would just add both frame and scope, but it would DCE away if nothing used them
<enebo> headius: well yeah but adding more instrs is not super desirable
<headius> hmm, sounds wasteful maybe?
<headius> or there would be NO ACP at all
<enebo> headius: well for stuff like persistence it is a pain
<headius> we just assume frame is needed, and when it's not it goes away
<enebo> headius: addvisitors and crud like that
<headius> enebo: so how about another operand to Call then?
<headius> for frame
<enebo> headius: I guess if we did do this and wanted instrs we could maybe add as RuntimeHelper and not really calls
<enebo> headius: after all we are not treating as calls really at that point anyways
<headius> this would also set the stage for passing frame through call stack and never pushing it
<enebo> well I have liked that idea for a long time :)
<headius> which would eliminate GEB
<enebo> I just cower at the commit :)
<headius> I think this is a good idea :-)
<enebo> but pushing frame through eliminates this need altogether too
<headius> well it requires this
<enebo> I do not think it would eliminate GEB
<headius> there has to be an instr for getting the frame into the call
<headius> sure it would...no push/pop means no finally
<headius> the geb is mostly for protocol, right?
<enebo> we still need to have an edge to that code and n ensures need to execute in the same scope
<headius> ensures don't run in GEB
<headius> they get their own blocks and exception-handling
<headius> GEB is for whole-method protocol
<enebo> oh yeah they have a weird name don’t they
<headius> so if there's no protocol, there's no GEB
hobodave has quit [Quit: Computer has gone to sleep.]
<enebo> but we do not need to have frame if we just pass it everywhere in IR
<enebo> err to all calls
<headius> if we pass it everywhere, we need to have it :-)
<enebo> not as an IR concept
<headius> yeah but what are you going to pass?
<headius> in a frameless method
<enebo> null?
<enebo> :)
<headius> you're lame
<headius> stand in the corner
<headius> we'd still need intelligence whether to pass null
<headius> I think my idea could be done without any new instructions, or just a minimal set
<headius> Call has an optional operand Frame
<headius> if frame is consumed, the protocol lives through GEB
<headius> if frame is not consumed, protocol and GEB go away
<headius> and then inlining gets simple too because frames know which calls they go to and might just disappear
<headius> simpler I mean...wrt framing
<enebo> but if we detect the methods at build time we do not need this in the call do we?
<headius> we do if we want the IR to see data flow of frame
<enebo> we can know whether frame will exist in scope
<headius> which it needs to be able to eliminate it
<headius> this also could be used to defer frame creation until it's actually needed
<enebo> I am not following you mean if we have a provably dead path we can kill frame?
<headius> we do it manually, statically right now
<headius> I want IR to do it
<headius> simplifies other things
<headius> and if we get to the point of knowing exactly *what* gets consumed out of the frame, we can start doing partial frames
<enebo> so we mark named calls with something to indicate they require a frame
<headius> like block_given? would only need a frame to hold block
<headius> right
<enebo> then passes will determine whether it is really needed
<headius> I think it would be worth it for the potental to eliminate GEB alone
<headius> that adds a ton of code for even simple methods that need frame
<headius> I should correct myself...it would still be a static optimization, but within the realm of IR
<enebo> I always wish that frame was not a thing in IR personally
<headius> we wouldn't have manual code all over to check if a frame is needed
<enebo> I wished we could splinter that apart to what we really need to check
<enebo> like visibility
<headius> sure, that was my second point
<enebo> did you write the second point above?
<headius> visibility would be an operand for e.g. a call to "public"
<enebo> I think I missed it
<headius> "and if we get to the point of knowing exactly *what* gets consumed out of the frame, we can start doing partial frames"
<enebo> oh that’s what you meant by partial
<headius> we actually do have that information already
<enebo> ok partial made me wonder if you just meant part of the method would stand up a frame only if reached or something
<headius> I don't just blanket native methods with "frame = true"...they all say exactly what they consume and whether they read or write it
<headius> ahh that was lazy framing
<headius> that's there too
<headius> this is all possible but I'm pretty sure it would be easier if IR just did it
<headius> and it doesn't require adding more than a few instrs
<enebo> It might not require adding any more instrs
<headius> might not
<enebo> maybe more operands
<enebo> “special” ones like %current_module
<headius> yeah
<enebo> I guess if all of this is truly static from build time you can do this in two ways via flags on scope and via extra info on instrs
<headius> all of this combined could mean we eliminate frame altogether even for cases that need it, by having some other thread-local mechanism for individual frame fields
<headius> back to JRuby 0.8.3 framing
<enebo> the former is more of a pain during generation but you can say I have this method and it requires visibilty
<enebo> yeah I would love to blow apart frames
<enebo> back to sphagetti stacks
<enebo> if IR could help simplify managing that then it would be a win for sure
<headius> it matches MRI semantics better too
<enebo> I wish GEB was not called GEB
<subbu> headius, enebo i haven't followed your conversation ... but, ACP adds frames / scopes if it determines the scope needs it. so, it is already conditional. if you have more info to add to that flag computation, you can update it.
<subbu> but, i am not following this new instr. and passing frame into call business.
* subbu was reading election news
<headius> subbu: I'm thinking that if frame were just another operand to be consumed, the call protocol would just DCE away without us having to calculate those flags
<headius> and we could start splitting up the frame and only using what we need
<headius> which would reduce cost of populating and clearing it
<subbu> but, you need to know what calls in the scope are going to need it.
<subbu> are you saying there is information available about calls and their targets and what need them and what don't?
<subbu> if so, that information can be added to the flag computation and not emit them in the first place.
<headius> yes
<subbu> why add them and run dce?
<headius> I suppose the instructions that prepare and pop frame could just aggregate better information
<headius> like we know block_given? only reads block from frame, so if that's the only thing that needs frame we only populate block
<subbu> in the past we have talked about splitting up frame into into its constituents ..
<headius> right
<subbu> so that we know what part of the frame is required ... but, we couldn't determine how much it might buy us.
<subbu> but, that is still interesting.
<headius> is that better to do by having frame instr be smart or by having instrs for frame fields?
<subbu> so, worth revisiting .. i agree.
<headius> yeah
<enebo> yeah I am all for splitting up frame
<headius> nothing I'm going to do today
<enebo> Adding instrs or operands is less clear to me
<headius> hell, I want the opposite of enebo...but I'm probably leaning toward having a JVM bytecode IR I can emit rather than directly emitting bytecode
<headius> have thought about using that Soot project
<headius> bytecode API with an IR and optimization passes
<enebo> headius: that is an interesting idea but completely different idea :)
<headius> I'm full of it
<headius> ideas are cheap...I should make a project that just comes up with ideas and never implements anything
lanceball is now known as lance|afk
<enebo> our instr set at least is supposed to give us ruby semantics we can leverage…although I am unsure how well that has worked out in practive
<enebo> block_given? is an instr now alrteady
<subbu> sorry .. was distracted IRL :)
<enebo> headius: we should just sub block_given? with the instr and not emit it as a call at all
<enebo> got a motor
enebo has quit [Quit: enebo]
<subbu> oh, enebo left.
<headius> yup, party's over
<subbu> :)
<subbu> ok.
<subbu> he is off like clockwork around 5ish.
Aethenelle has quit [Quit: Aethenelle]
<subbu> anyway ... we can revisit the frame splitting and see what makes most sense.
<headius> oh yeah, Tom's a 9-5er
<headius> I'm more of a whenever to whenever guy
<subbu> i think i am in between you two .. :) not quite 9-5 but not quite whenever-to-whenever either.
subbu is now known as subbu|afk
<headius> fair enough
<headius> ttfn, time for me to call it a day
<headius> I'll land two-obj array shortly
Aethenelle has joined #jruby
norc has left #jruby ["Leaving"]
subbu|afk is now known as subbu
oblutak has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
robbyoconnor has joined #jruby
Aethenelle has quit [Quit: Aethenelle]