A Rubyist's Walk Along the C-side (Part 4): Primitive Data Types - Peter Zhu

In the previous article, you saw how to call Ruby methods in C extensions. In this article, we’ll look at the primitive data types in the Ruby C API.In Ruby, everything is an object. However, that is not true when writing a C extension as not all types are created equal. For the more “primitive” types, there are often more efficient ways to manipulate them than to call the Ruby method. For example, there’s a more efficient way to get an element at a particular index in Ruby arrays in C than to call Array.
A Rubyist's Walk Along the C-side (Part 4): Primitive Data Types - Peter Zhu #ruby #rubydeveloper #rubyonrails #types https://rubyonrails.ba/single/a-rubyist-s-walk-along-the-c-side-part-4-primitive-data-types-peter-zhu

Nezir Zahirovic

Contractor Ruby On Rails (8+ years) / MCPD .Net / C# / Asp.Net / CSS / SQL / (11 years)

related articles