Please delimit code correctly for the forum:
EDIT: Thanx for fixing.
This is the C SDK subcategory and the topic opener is asking about it’s use, Not the Ruby API.
As the Ruby API is interpreted it would likely be slower than anything written directly in C, especially using Ruby’s C interface. (I.e., Ruby itself is coded in C.)