simdjson_ruby icon indicating copy to clipboard operation
simdjson_ruby copied to clipboard

Fix performance on Ruby 3.0

Open Watson1978 opened this issue 3 years ago • 0 comments

The Makefile generated by extconf.rb has changed in Ruby 3.0. Therefore, when using Ruby 3.0, the optimization flags are not set properly and it reduced the performance.

This patch will set optimization flags in compiling properly.

  • Here is Ruby 2.7 Makefile result:
CXXFLAGS = $(CCDLFLAGS) -g -O2 -std=c++1z -Wno-register  $(ARCH_FLAG)
  • Here is Ruby 3.0 Makefile result:
CXXFLAGS = $(CCDLFLAGS)  -std=c++1z -Wno-register  $(ARCH_FLAG)

This PR will fix issue same with https://github.com/anilmaurya/fast_jsonparser/issues/20

Watson1978 avatar Sep 06 '21 06:09 Watson1978