In most WebApps the first performance bottleneck people tend to hit is the DB: missing indexes, n+1 queries, etc.
1. How did you evaluate performance? Did you let it run for a while in production? YJIT's improvements will be most visible over time.
2. If your web app's response times are dominated by database queries, then YJIT will do nothing for you. Even re-writing your app in assembly language won't help. All languages are equally fast when sitting around waiting for the database to response. ;-)
That said, if your response times are dominated by db query wait times, maybe the async queries in Rails 7.x can offer you some very nice improvements. However, you will probably need to restructure (not rewrite, exactly, but restructure) your code to take advantage. Not the whole app, just the hot spots.
https://www.shakacode.com/blog/rails-7-1-active-record-api-f...
[edit, the memory increase was small just a few percent IRC]
With YJIT enabled memory usage ballooned and performance dipped below non-YJIT Ruby 3.2, IIRC the difference was a good 10% degradation. Granted, it's an API only service so no HTML is being generated, only JSON and that could be the culprit.
Suffice it to say, we didn't enable YJIT for 3.2. Maybe 3.3 is indeed different, but both the faster and less memory claims are really suspicious to me.
If what is slow is some RUby code like Active Model Serializers etc, then maybe it can help a bit there.
But yes, generally YJIT works very well on HTML templates because they are compiled as large methods with not a lot of branches.