{
  "$type": "site.standard.document",
  "content": "---\ntitle: \"Jekyll build speedups for Ruby 3.2\"\ndescription: \"Ruby 3.2's YJIT gave my Jekyll builds a 4.8x speedup---from 17 seconds down\n  to under 4.\"\ntags:\n  - dev\n---\n\nThere's a [bunch of buzz](https://news.ycombinator.com/item?id=34413012) about\nRuby's new YJIT in v3.2.0. I have to develop and maintain a bunch of Jekyll\nwebsites for work, some of which are getting into \"non-trivial build time\"\nterritory (or maybe I'm really easily distracted, but a 30s build is enough for\nme to break my flow).\n\nHere's some very unscientific benchmarks from my [Jekyll](https://jekyllrb.com)\n(v4.3) builds on my M1 Max MBP (64GB).\n\n## ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [arm64-darwin21]\n\nFirst, this is the previous version of Ruby, which I've been happily working\nwith for ages.\n\n    bundle exec jekyll build\n\nAveraged over 3 runs, the build time was 17.7 (±0.8) seconds.\n\n## ruby 3.2.0 (2022-12-25 revision a528908271) [arm64-darwin22]\n\nAfter upgrading to the latest Ruby v3.2.0, the average over 3 runs was 17.2\n(±0.2) seconds.\n\n## ruby 3.2.0 (2022-12-25 revision a528908271) +YJIT [arm64-darwin22]\n\nI\n[followed these instructions](https://dev.to/dpaluy/install-ruby-320-yjit-with-asdf-b82)\nto build a YJIT-enabled Ruby v3.2. Then, after re-installing all the deps:\n\n    RUBY_YJIT_ENABLE=true bundle exec jekyll build\n\nThe build was _heaps_ faster---the average over 3 runs was 3.7 (±0.2) seconds.\n**That's a 4.8x speedup**.\n\nObviously, like all benchmarks on the internet this one is wrong & stupid and\nyou should do your own testing. Three runs probably isn't enough to shake out\nany cache effects, and I don't know (but could guess?) that the JIT might have\neven more pronounced cold start issues, although I didn't really see it above.\nAnyway, if you build a lot of Jekyll sites, my anecdotal evidence is that you\ncan save yourself a bunch of time and tighten those feedback loops to stay in\nthe flow state.\n",
  "createdAt": "2026-05-13T23:14:46.431Z",
  "description": "Ruby 3.2's YJIT gave my Jekyll builds a 4.8x speedup---from 17 seconds down to under 4.",
  "path": "/blog/2023/02/02/jekyll-build-speedups-for-ruby-3-2",
  "publishedAt": "2023-02-02T00:00:00.000Z",
  "site": "at://did:plc:tevykrhi4kibtsipzci76d76/site.standard.publication/self",
  "tags": [
    "dev"
  ],
  "textContent": "Ruby 3.2's YJIT gave my Jekyll builds a 4.8x speedup---from 17 seconds down to under 4.",
  "title": "Jekyll build speedups for Ruby 3.2"
}