Top all-time · #986
Chris Seaton
Personal blog · chrisseaton.com · on HN as chrisseatonprogrammingsystems
Chris Seaton's personal blog at chrisseaton.com covers programming and systems. Since 2010, 70 different Hacker News readers have linked it 156 times, most often “Very High Performance C Extensions for JRuby+Truffle”. No feed was found, so read it on the site itself.
Most-linked posts?
- Very High Performance C Extensions for JRuby+Truffle10 people · 12 mentions · first linked 2015-09-10
- High Performance C Extensions for JRuby and Truffle8 people · 10 mentions · first linked 2014-10-27
- Deoptimizing Ruby (2014)4 people · 8 mentions · first linked 2015-10-10
- JRuby+Truffle measurements4 people · 5 mentions · first linked 2014-07-10
- The Future Shape of Ruby Objects4 people · 5 mentions · first linked 2021-09-10
- JRuby+Truffle Overview and Tests4 people · 5 mentions · first linked 2014-11-22
- Understanding Basic Graal Graphs3 people · 5 mentions · first linked 2020-06-11
- Deoptimizing Ruby (2014)3 people · 5 mentions · first linked 2020-10-21
- Practical Partial Evaluation for High-Performance Dynamic Language Runtimes [pdf]3 people · 4 mentions · first linked 2019-05-11
- /rubytruffle/3 people · 4 mentions · first linked 2015-10-29
What Hacker News says?
I wonder if future work might support C Extensions in the same was as the jruby truffle / graal implementation plans to do. Here's a great article from a couple of years ago by Chris Seaton on this topic. http://chrisseaton.com/rubytruffle/cext/
Comment linking /rubytruffle/cext/
on “Grumpy: Go running Python”Submitted Why I'm in the Army Reserve – an explainer for my friends in tech as a story · 485 points
HN discussion> I think MoarVM/NQP are strikingly similar in their approach Does MoarVM use a meta-compilation technique? Pypy for example uses meta-tracing and Truffle uses Partial Evaluation to get from an interpreter specification to dynamically compiled code without duplicating the language logic. If yes, could you please point me to further information? Meta-compilation is the primary innovation in Truffle. It allows to comp…
Comment linking /rubytruffle/pldi17-truffle/pldi17-truffle.pdf
on “GraalVM: Run Programs Faster Anywhere”Submitted Ruby's Proposed STM as a story · 293 points
HN discussionTo give you an idea of how deep this goes - you can pass a Ruby object to a C function and the C function can read and write it as if it was a pointer to a structure. http://chrisseaton.com/truffleruby/structs/
Comment linking /truffleruby/structs/
on “GraalVM: Run Programs Faster Anywhere”Submitted Show HN: A side project in medical devices as a story · 267 points
HN discussionWe don't convert. We have defined a contract that all languages can work with (quite a challenge and still evolving). From the website: > In order to provide foreign polyglot values meaning in languages we have developed the so-called polyglot interoperability protocol. This interoperability protocol consists of a set of standardized messages that every Graal language implements and uses for foreign polyglot values.…
Comment linking /rubytruffle/dls15-interop/dls15-interop.pdf
on “GraalVM: Run Programs Faster Anywhere”Submitted Understanding How Graal Works – A Java JIT Compiler Written in Java as a story · 174 points
HN discussionRelated: I believe there is ongoing work (not in 3.1) to modify the CRuby implementation to use shapes/hidden classes. This has significant potential to speed things up. More info: https://chrisseaton.com/truffleruby/rubykaigi21/
Comment linking /truffleruby/rubykaigi21/
on “Ruby 3.1”Submitted The Future Shape of Ruby Objects as a story · 153 points
HN discussionThere are actually two problems here: How to handle things being re-defined and how to handle an unexpected type after speculation. In real high performance VMs the guard for redefinition is effectively a single instruction which is a CPU can easily branch predict and handle with out of order execution: https://chrisseaton.com/truffleruby/low-overhead-polling/ With unexpected types we can use LuaJIT as an example: T…
Comment linking /truffleruby/low-overhead-polling/
on “A lighter V8”Submitted Specialising Dynamic Techniques for Implementing The Ruby Programming Language as a story · 115 points
HN discussionEvery stack allocation scheme I've seen creates a fully reified object though, with a class pointer as normal. You may be confusing with scalar replacement of aggregates, which is a separate concept. https://chrisseaton.com/truffleruby/seeing-escape-analysis/
Comment linking /truffleruby/seeing-escape-analysis/
on “Generics can make your Go code slower”Submitted Specializing Ropes for Ruby [pdf] as a story · 68 points
HN discussion> I don't understand how this is supposed to be "quickly" verifiable? You don’t verify, and instead you run assuming no verification is needed. Then if someone wants to violate that assumption, it’s their problem to stop everyone who may have made that assumption, and to ask them to not make it going forward. You shift the cost to the person who’s doing the metaprogramming and keep it free for everyone who isn’t. ht…
Comment linking /truffleruby/deoptimizing/
on “Modern Python Performance Considerations”Submitted ManagedC: Memory safe execution of C on a JVM [pdf] as a story · 59 points
HN discussionTruffleRuby uses ropes to do exactly this. It can even optimize away the buffer string instance: https://chrisseaton.com/truffleruby/ropes-manlang.pdf CRuby makes a bunch of memcpy calls but compared to everything else, they're fast enough they don't seem to matter much. I've run perf on CRuby running a bunch of different web app type tasks (even rendering huge JSON payloads) and it's never shown up. You can see an…
Comment linking /truffleruby/ropes-manlang.pdf
on “An Interview with Jose Valim, Creator of Elixir”Submitted Stamping Out Overflow Checks in Ruby as a story · 57 points
HN discussion> If it needs to be fast for CPython, it has to be written in C, but if it needs to be fast for a JIT, you cannot use C. He showed a simple mysum() function that totaled up the elements in an iterable. If it is passed a Python object like list(range(N)), the JIT knows what it is and can do lots of optimizations. But if it is passed a NumPy array, which is "opaque C stuff", the JIT doesn't understand it, so it will h…
Comment linking /rubytruffle/cext/
on “Python JITs are coming”Submitted Katahdin - A language where syntax and semantics are mutable at runtime as a story · 31 points
HN discussionThe Truffle implementation of Ruby can be plugged into a Truffle implementation of C, in order to maintain compatibility with C extensions http://chrisseaton.com/rubytruffle/cext/ Has anyone in the Python community thought of doing something similar, e.g. using PyPy to build a C interpreter, maybe re-using front-end components (pre-processor, parser, type-checker, etc.) from an existing C compiler? In fact, it might…
Comment linking /rubytruffle/cext/
on “Python JITs are coming”Submitted High Performance C Extensions for JRuby and Truffle as a story · 13 points
HN discussionSpeaking of C APIs, JRuby+Truffle is going all-out: > Our new solution in JRuby+Truffle is pretty radical - we're going to interpret the C source code of your extension. We use the same high performance language implementation framework, Truffle, and dynamic compiler Graal, to implement C in the same way as we have implemented Ruby. http://www.chrisseaton.com/rubytruffle/cext/
Comment linking /rubytruffle/cext/
on “What Blocks Ruby and Python from Getting to JavaScript V8 Speed?”Submitted Deoptimizing Ruby as a story · 8 points
HN discussionIf you are a Java developer and find PyPy amazing, you should also look at Truffle and Graal http://lafo.ssw.uni-linz.ac.at/papers/2013_Onward_OneVMToRul... , http://chrisseaton.com/rubytruffle/ , https://bitbucket.org/ssllab/zippy/src/700f88dc2a7d2011258ae...
Comment linking /rubytruffle/
on “PyPy 4.0.0 Released – A Jit with SIMD Vectorization and More”Submitted JRuby+Truffle measurements as a story · 8 points
HN discussionI believe truffle ruby does this: http://chrisseaton.com/truffleruby/deoptimizing/
Comment linking /truffleruby/deoptimizing/
on “What I Learned Making My Own JIT Language”Submitted Context on STM in Ruby as a story · 4 points
HN discussionhttp://www.chrisseaton.com/rubytruffle/deoptimizing/
Comment linking /rubytruffle/deoptimizing/
on “Jvm.go: A JVM written in Go”Submitted Seeing Register Allocation Working in Java as a story · 4 points
HN discussion