A Rubyist's Walk Along the C-side (Part 11): Debugging
Tips and tricks for the inevitable day: when the C extension crashes.
Tips and tricks for the inevitable day: when the C extension crashes.
At Shopify, we are constantly improving the performance of Ruby for everyone. Based on analysis of and experiments on one of our largest and highest traffic apps, we found two improvements in Ruby's garbage collector that significantly improved our garbage collector performance, which in turn reduced our response times by 8%.
Overview of how Ruby's garbage collector works.
We've open sourced the definitions to build the Ruby we use at Shopify in development, testing, and production.
Tools and methodologies to benchmark Ruby code.
Learn more about Variable Width Allocation, a new feature in Ruby 3.2 that improves performance by optimizing Ruby's memory layout.
Practice your C extensions skills with a small project.
Sometimes things don't go as expected and need to raise or rescue from errors.
Are you a maintainer of a Ruby native extension gem? rb_gc_force_recycle will be deprecated in Ruby 3.1. Read to find how it affects you.
Let's look at this special type of object that only exists in C extensions called TypedData objects.
Let's look at the internals of ruby_memcheck, a tool to find memory leaks in native gems.
Finding and fixing a memory leak in Ruby strings.
Defining classes and modules and creating instances of classes.
Reading and writing instance variables, class variables, global variables, and constants through the Ruby C API.
The primitive data types in the Ruby C API and how to use them.
Calling Ruby methods in C extensions.
Defining Ruby methods in C extensions.
Let's look at how to set up and build your first Ruby C extension!
A series on writing your very first Ruby C extension, from scratch!
What's the midpoint between 0 and infinity in Ruby? It's 1.5 for some reason. What's the reason you might ask? Read on to find out.
A story about memory corruption inside Ruby when you create strings the wrong way.
There are many different ways to create Ruby strings in C, and choosing the wrong one can have catastrophic effects. So which one do you choose?
Overview of how Ruby's garbage collector works in Ruby 3.0.
Tips on development, tools, and debugging in MRI Ruby.