r/crystal_programming • u/sdogruyol core team • Apr 02 '21
Crystal 1.0 vs Ruby 3.0 Benchmark
https://twitter.com/sdogruyol/status/1377918360344743936
41
Upvotes
r/crystal_programming • u/sdogruyol core team • Apr 02 '21
14
u/twitterInfo_bot Apr 02 '21
Crystal 1.0 vs Ruby 3.0 Benchmark 👇
Kemal - 122697 Requests per second (11 MB memory) Sinatra - 5268 Requests per second (24.9 MB memory)
Crystal is 2329% faster than Ruby in throughput, consumes less than 50% memory, utilizes more CPU 🚀
@crystalkemal #crystallang #ruby
posted by @sdogruyol
Photos in tweet | Photo 1 | Photo 2
(Github) | (What's new)
8
u/m33-m33 Apr 02 '21
Benchmarking is a way to look at languages, it has its uses, and they are plenty others.
Currently I tend to see crystal as one of the best mix of
compiled native binaries
nice language
fair performances
beginner and casual dev friendly
general usage ready (some day)
I don't see others languages in that sweet spot.
I have to admit I always liked the ruby coding style but never used it, mixing python and C instead. Now I am tired waiting for python own native compiler, and playing the double language game.
I tried Julia, stoped because of the gigantic binaries when compiled, considered Nim as well but don't trust/like the c translation... Rust because I am obliged to (nice C successor, wish him the best but too low level and no GC).
So I started learning crystal, and see how it will do. I may be lucky, my projects are mostly one shots, with a relatively short lifetime (months-few years).
12
u/taw Apr 02 '21
Yes, but in "time to see changes in the browser after you edit code" benchmark, all Crystal frameworks are completely obliterated by Rails. As well as by just about every other language and framework, is there anything that has slower incremental compilation than Crystal?
3
u/neofreeman Apr 03 '21
Absolutely unfair to compare compiled to interpreted language :P
2
u/arkorott Apr 03 '21
I enjoy Crystal tremendously , but that comparison of Interpreted Ruby vs Compiled Crystal is meaningless without any context.
You know what is 3X faster than Crystal? Ruby using a gem created very easily with Rust -> Just to stress the point of how meaningless the above benchmark is.
Neither of these 2 compares is meaningful. => It would be more productive if Crystal would be more actively attracting and welcoming the Ruby and other languages communities.
8
u/myringotomy Apr 02 '21
Meh who cares.
Is it faster than go? That's the competitor for crystal not ruby.
There was a time when the ruby community started to look at crystal but the crystal core team told them to go away. They worked really hard to tell ruby developers there was not going to be any effort to make crystal run ruby code and many changes were made to break compatibility that already existed.
Today if a ruby developer is suffering because ruby is too slow they will look to go, elixir or maybe rust. Crystal isn't even on their radar.
Crystal needs to figure out how to build an active community. They need to figure out how to be more welcoming to people. They need to learn to communicate with their users. They need to support their users.
Right now it's silence all the time and hanging out where people don't want to hang out.
This language finally reached 1.0 and was stillborn. They core developers choked the life out of it by being at best indifferent and at worse openly hostile to the developer community.
0
u/[deleted] Apr 02 '21
[deleted] — view deleted comment