Ruby 3.0.0-preview1 just got released!
https://www.ruby-lang.org/en/news/2020/09/25/ruby-3-0-0-preview1-released/
I have done some benchmarks with 2.7.1 and 3.0.0-preview1.
Benchmark
Ruby Details:
CFLAGS
- Ruby 2.7.1
-O3 -pipe -fno-plt -march=native -mtune=native -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wduplicated-cond -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wwrite-strings -Wimplicit-fallthrough=0 -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-packed-bitfield-compat -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wunused-variable
- Ruby 3.0.0-preview1
-O3 -pipe -fno-plt -march=native -mtune=native -ggdb3 -Wall -Wextra -Werror=deprecated-declarations -Werror=duplicated-cond -Werror=implicit-function-declaration -Werror=implicit-int -Werror=misleading-indentation -Werror=pointer-arith -Werror=write-strings -Wimplicit-fallthrough=0 -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-packed-bitfield-compat -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wunused-variable
Benchmark Code:
System Details
Kernel
Linux version 5.8.8-xanmod1-1 (makepkg@archlinux) (gcc (GCC) 10.2.0, GNU ld (GNU Binutils) 2.35) #1 SMP PREEMPT Fri, 11 Sep 2020 06:25:53 +0000
CPU
Intel(R) Core(TM) i3-6006U CPU @ 2.00GHz
Memory (RAM)
*-bank:1
description: SODIMM DDR4 Synchronous 2400 MHz (0.4 ns)
product: HMA851S6AFR6N-UH
vendor: SK Hynix
physical id: 1
serial: 2955429E
slot: DIMM B
size: 4GiB
width: 64 bits
clock: 2400MHz (0.4ns)
System was idle at 0% CPU usage during benchmarks.