From Ruby to Crystal: A Quick Look
spin.atomicobject.com
From Ruby to Crystal: A Quick Look
1–10 of 44 posts
Re: From Ruby to Crystal: A Quick Look
#2Re: From Ruby to Crystal: A Quick Look
#3Re: From Ruby to Crystal: A Quick Look
#4Imagine a world where you write your code in Ruby, but farm out the expensive operations to a Ruby-like Crystal extension (similar to what is commonly done with C or Rust). I think this is possible already (just after a quick Google search[1]), just not friendly for the average Ruby dev to implement.
[1] https://www.slideshare.net/AnnaKazakova/how-to-write-ruby-ex...
Re: From Ruby to Crystal: A Quick Look
#5Crystal could be a really powerful tool for enhancing existing Ruby code. Imagine a world where you write your code in Ruby, but farm out the expensive operations to a Ruby-like Crystal extension (similar to what is commonly done with C or Rust). I think this is possible already (just after a quick Google search[1]), just not friendly for the average Ruby dev to implement. [1] https://www.slideshare.net/AnnaKazakova/…
Re: From Ruby to Crystal: A Quick Look
#6Re: From Ruby to Crystal: A Quick Look
#7Re: From Ruby to Crystal: A Quick Look
#870x faster? If Crystal gets its own port of Ruby on Rails, oh boy.
Re: From Ruby to Crystal: A Quick Look
#970x faster? If Crystal gets its own port of Ruby on Rails, oh boy.
E.g. using method calls inside the class instead of accessing instance variables instantly springs to mind, as does the "unsorted priority queue" which is basically a horrible abuse of Array but wrapped in a class that makes it even slower by adding additional method calls for every operation.
That's not to diminish the speedup Crystal gets, because it does illustrate how slow MRI's method calls are, but it'd be interesting in seeing a comparison with an astar implementation that was actually written to be fast in Ruby.
Also would be very interesting to see a comparison with jRuby+Truffle, of course.
Re: From Ruby to Crystal: A Quick Look
#10Crystal could be a really powerful tool for enhancing existing Ruby code. Imagine a world where you write your code in Ruby, but farm out the expensive operations to a Ruby-like Crystal extension (similar to what is commonly done with C or Rust). I think this is possible already (just after a quick Google search[1]), just not friendly for the average Ruby dev to implement. [1] https://www.slideshare.net/AnnaKazakova/…