Slide 1

Slide 1 text

Ruby is not slow anymore @kalashnikovisme

Slide 2

Slide 2 text

Pasha Kalashnikov @kalashnikovisme Backend Engineer @ @evilmartians

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

@kalashnikovisme @evilmartians They say

Slide 5

Slide 5 text

Ruby is too slow @kalashnikovisme @evilmartians They say What does it mean?

Slide 6

Slide 6 text

1 2 3 4 5 6 7 8 9 10 11 12 13 14 the_fastest_lang.rb faster.cpp @kalashnikovisme @evilmartians def sum_eq_n?(arr, n) return true if arr.empty? && n == 0 arr.product(arr).reject do |a,b| a == b end.any? { |a,b| a + b == n } end Is this slow?

Slide 7

Slide 7 text

1 2 3 4 5 6 7 8 9 10 11 12 13 14 the_fastest_lang.rb faster.cpp @kalashnikovisme @evilmartians def some_method sleep Random.rand(1_000_000) end or this?

Slide 8

Slide 8 text

what is slow? @kalashnikovisme @evilmartians But

Slide 9

Slide 9 text

@kalashnikovisme @evilmartians What virtual machine is slow?

Slide 10

Slide 10 text

@kalashnikovisme @evilmartians What virtual machine is slow? (interpreter, runtime)

Slide 11

Slide 11 text

MRI / YARV - slow ? @kalashnikovisme @evilmartians What virtual machine? (interpreter, runtime)

Slide 12

Slide 12 text

MRI / YARV - slow ? @kalashnikovisme @evilmartians JRuby / JVM - slow ? What virtual machine? (interpreter, runtime)

Slide 13

Slide 13 text

MRI / YARV - slow ? @kalashnikovisme @evilmartians JRuby / JVM - slow ? Rubinius - slow ? What virtual machine? (interpreter, runtime)

Slide 14

Slide 14 text

@kalashnikovisme

Slide 15

Slide 15 text

@kalashnikovisme

Slide 16

Slide 16 text

@kalashnikovisme hack yourself

Slide 17

Slide 17 text

@kalashnikovisme Ruby

Slide 18

Slide 18 text

@kalashnikovisme Rust

Slide 19

Slide 19 text

Year of Rust @kalashnikovisme @evilmartians 2022 in the Ruby community

Slide 20

Slide 20 text

No content

Slide 21

Slide 21 text

No content

Slide 22

Slide 22 text

Proof of concept @kalashnikovisme @evilmartians Let’s make a The fastest JSON parser Ruby gem ever!!!

Slide 23

Slide 23 text

https://youtu.be/qxZ2ste7RyA

Slide 24

Slide 24 text

@kalashnikovisme @evilmartians Ruby Class Magnus Type String RString Integer Integer Float Float Array RArray Hash RHash Symbol Symbol Class RClass Module RModule

Slide 25

Slide 25 text

Thanks for watching @kalashnikovisme @evilmartians and don’t forget to subscribe! @kalashnikovisme @kalashnikovisme kalashnikovisme.medium.com [email protected] @evilmartians @evilmartians https://evilmartians.com