Closed Doldrums closed 2 years ago
@Doldrums ready to merge?
@Doldrums what's up with this?
@yegor256 as it was discussed on weekly meeting - no need for this pr in performance-speed-up field for pdd project (we had reached our perfomance-speed goals with ruby refactoring)
Description
Since our goal is to achieve Benchmarking speed values of at least 10ms, it was found that the best approach in this is to write C extensions to Ruby source code.
Using Ruby-C Api as best practices in Ruby-lang main repo.
Checklist of main steps:
✅ Conduct Profiling and Benchmarking
Preliminary Analysis was done via
ruby-prof
Benchmarking tool. Absence ofFlamegraph
support inruby-prof
force us to usestackprof
Profiling tool.✅ Reveal Bottlenecks through
PDD.rb
✅ Prioritization of TOP-5 Bottlenecks methods and division of responsibility by Extensions
In general, the obvious solution seems to start with the takeaway
PDD::Source#puzzles
from Ruby to C.✅ Research topic and preparing the environment for extensions ✅ Write unit functions for extensions ✅ Write basic implementation for useful structures (Dynamic arrays and etc) for C-lang ✅ Transfer Ruby regexp to POSIX standart C format regexp (Need for unit functions like check puzzle rules) 🔧 Write
PDD::Source#puzzles
like C-lang extension 🔧 Testing extension [ ] Conduct checking Profiling and Benchmarking