<kares[m]>
Hey 0xd I used to do that, until I went with a full-time job. I'll be interested knowing who's up for it ...
<kares[m]>
In general it's not a one time show as some expect (except for some low hanging fruits) - you will need to learn and experiment with settings such as GC a bit, ideally if you have some kind of monitoring set up for the JVM applications.
<GGibson[m]>
Anyone know if there is a jruby gem/way to call a Kernel32.dll function on Winderz?
<chrisseaton[m]>
Can you use Fiddle or FFI to do it?
<GGibson[m]>
I don't know those
<GGibson[m]>
I was wondering if there was a gem to make those calls
<chrisseaton[m]>
These are those gems (well Fiddle is builtin, and I think JRuby ships FFI as well)
<GGibson[m]>
I see - so I have to delve into the dark arts of lib interfacing?
<chrisseaton[m]>
Are you already doing that if you're calling functions in `Kernel32.dll`?
<GGibson[m]>
no, I'm just researching such a move
<GGibson[m]>
I've not done FFI before -- noob
<chrisseaton[m]>
Well it's not much more than a one-liner to call a simple function.
<GGibson[m]>
cool
nirvdrum has joined #jruby
<M0xd[m]>
kares: Yes, we are aware of the challenge, that's why we want to get training for all the engineers and let them do the tunning. Let me know if you happen to know any company or contractor specialized in this area. I would be pretty happy to get someone involved in JRuby if possible.
<GGibson[m]>
Question : Does anyone know how many bytes of memory are used for each object reference in jruby? (in C Ruby it is 40 bytes on 64-bit machines).
<chrisseaton[m]>
Each reference? Usually 4 bytes, sometimes 8 bytes.
<havenwood>
GGibson[m]: BigDecimal is arbitrary precision, but no way to change Float precision afaik.
<headius[m]>
Correct
<headius[m]>
There's some minor differentness with CRuby also
<chrisseaton[m]>
I'd like to work out and write down exactly what those differences are -not sure I've ever seen a blog post about it. I think it's taken from the mantissa.
<headius[m]>
<GGibson[m] "I've not done FFI before -- noob"> There are examples in the stdlib win32.rb code also
<GGibson[m]>
thanks
<GGibson[m]>
odd. in C Ruby I could freely use 0.0001 and not lose the digits. JRuby chops them off
<GGibson[m]>
funky
<headius[m]>
That's worth reporting as an issue
<headius[m]>
It may be a rounding difference
<havenwood>
GGibson[m]: I can't reproduce CRuby not chopping them off.
<byteit101[m]>
Interesting: (1..10).to_enum(:map){1}.size is ~20x slower than MRI
<chrisseaton[m]>
In a bips benchmark?
<chrisseaton[m]>
Seems like that should possibly constant fold if it all goes well!
<byteit101[m]>
no, one off
<chrisseaton[m]>
You aren't going to see JRuby's potential with one-off code.
<byteit101[m]>
Very true! trying to write a test for a library to ensure that .size is cached for a custom enumerator, and my first though was just to time it and ensure an order of magnitude difference in results.
<chrisseaton[m]>
JRuby is a dynamically optimising system built on top of another dynamically optimising system - it just isn't reasonable to measure as you're doing.
<byteit101[m]>
Indeed!
<headius[m]>
The block there probably doesn't inline currently because the enum code is pretty generalized
<headius[m]>
Enums are so heavy and so commonly used with fibers that has not been a priority to optimize
<byteit101[m]>
headius: Oh, whenever you get a chance, I'd like your thoughts on the java ctor stuff, what should/shouldn't be in scope, etc