Commit Graph

  • 34971c0314 replace WhitespaceOrNothing regex with byte-level blank_string? check Tobi LutkeandChris Pak 2026-03-11 08:34:15 -04:00
  • f24ca042a2 avoid array allocation in parse_tag_token: return tag_name, store markup/newlines as class ivars Tobi LutkeandChris Pak 2026-03-11 08:33:19 -04:00
  • 4ea4350775 clean up filter parsing: Lexer fallback for args, no-arg fast scan stays Tobi LutkeandChris Pak 2026-03-11 08:31:30 -04:00
  • aedd2dded6 autoresearch.md: add strategic direction toward single-pass scanner architecture Tobi LutkeandChris Pak 2026-03-11 08:29:12 -04:00
  • e1f363c72c add security constraint to autoresearch.md, fix strict mode gate Tobi LutkeandChris Pak 2026-03-11 08:26:40 -04:00
  • 808dad6fab split filter parsing: scan no-arg filters directly, only invoke Lexer when args present Tobi LutkeandChris Pak 2026-03-11 08:26:04 -04:00
  • c82b6e58ef autoresearch: add autoresearch.md/sh, increase benchmark warmup to 20 iterations Tobi LutkeandChris Pak 2026-03-11 08:23:51 -04:00
  • b994f22983 extend fast-path to handle quoted string literal variables (262 more fast-pathed) Tobi LutkeandChris Pak 2026-03-11 08:20:39 -04:00
  • 62877e666c skip filter arg splat for no-arg filters, trim render loop comments Tobi LutkeandChris Pak 2026-03-11 08:06:23 -04:00
  • 48a2fae5f6 hoist write score check out of render loop: skip increment_write_score when no limits active Tobi LutkeandChris Pak 2026-03-11 08:04:40 -04:00
  • 27fcb3a4c9 use frozen EMPTY_ARRAY for disabled_tags in Variable Tobi LutkeandChris Pak 2026-03-11 07:47:51 -04:00
  • 6e9782c5cc return [tag_name, markup, newlines] from parse_tag_token: avoid 2 whitespace string allocs Tobi LutkeandChris Pak 2026-03-11 07:45:15 -04:00
  • da57336be9 use getbyte dispatch instead of start_with? in parse_for_document Tobi LutkeandChris Pak 2026-03-11 07:44:12 -04:00
  • 28f29433e4 avoid empty array allocation in evaluate_filter_expressions for no-arg filters Tobi LutkeandChris Pak 2026-03-11 07:43:09 -04:00
  • 4ff5523713 replace For tag Syntax regex with manual byte-level parser Tobi LutkeandChris Pak 2026-03-11 07:39:36 -04:00
  • f388c873de expose expression_cache/string_scanner via attr_reader, skip regex in filter args without colon Tobi LutkeandChris Pak 2026-03-11 07:38:16 -04:00
  • 543c1e1fe7 unified fast-path Variable parsing: handle both plain lookups and filter chains without full Lexer pass for name Tobi LutkeandChris Pak 2026-03-11 07:36:29 -04:00
  • 885c8df159 fast-path render for filter-less variables: skip render method overhead Tobi LutkeandChris Pak 2026-03-11 07:33:18 -04:00
  • 8f67d81023 skip TagAttributes scan in for tag when no colon present Tobi LutkeandChris Pak 2026-03-11 07:32:39 -04:00
  • 01f33e96e8 fast-path simple if conditions: skip ExpressionsAndOperators scan for single conditions Tobi LutkeandChris Pak 2026-03-11 07:31:26 -04:00
  • 9e6f93a494 replace SIMPLE_VARIABLE regex with byte-level scanner to avoid MatchData Tobi LutkeandChris Pak 2026-03-11 07:30:34 -04:00
  • dc6e9799e9 fast-path simple variable parsing: skip Lexer/Parser for plain dot-separated lookups Tobi LutkeandChris Pak 2026-03-11 07:29:47 -04:00
  • 98e29aa4a7 use frozen EMPTY_ARRAY for Variable filters when no filters present Tobi LutkeandChris Pak 2026-03-11 07:28:04 -04:00
  • a404cf10d0 fast-path variable_lookups: skip mutable string alloc when no dot/bracket follows Tobi LutkeandChris Pak 2026-03-11 07:26:40 -04:00
  • e73b41f3b6 fast-path String in render_obj_to_output, avoid Utils.to_s dispatch for common case Tobi LutkeandChris Pak 2026-03-11 07:24:30 -04:00
  • 9d9d094e20 short-circuit parse_number with first-byte check before regex Tobi LutkeandChris Pak 2026-03-11 07:23:41 -04:00
  • 4c96b5f682 avoid unnecessary strip allocation in Expression.parse, use byteslice for string literals Tobi LutkeandChris Pak 2026-03-11 07:23:08 -04:00
  • 0b19c0ce44 use equal? for frozen array comparison in Lexer, skip whitespace with \s+ Tobi LutkeandChris Pak 2026-03-11 07:21:19 -04:00
  • a43d970473 use getbyte instead of string indexing in whitespace_handler and create_variable Tobi LutkeandChris Pak 2026-03-11 07:19:26 -04:00
  • 3751f95da2 add auto/bench.sh: unit tests + liquid-spec + perf benchmark Tobi LutkeandChris Pak 2026-03-11 07:17:01 -04:00
  • 6ffd0e2339 replace VariableParser regex scan with manual byte parser in VariableLookup Tobi LutkeandChris Pak 2026-03-11 07:14:14 -04:00
  • dc7dda2253 replace FullToken regex with manual byte parsing in parse_for_document Tobi LutkeandChris Pak 2026-03-11 07:12:38 -04:00
  • 2479b26f5c add quick benchmark script for autoresearch Tobi LutkeandChris Pak 2026-03-11 07:10:28 -04:00
  • c99036046e Add strict2_parse to increment and decrement tags strict2-increment-decrement Alok SwamyandClaude Opus 4.6 2026-03-26 15:50:32 -04:00
  • a9c85622dd Merge pull request #2066 from eregon/skip-slow-test Kevin MenardandGitHub 2026-03-26 02:14:10 -04:00
  • 9f4d7e78b8 Skip slow test raising many exceptions on non-CRuby Benoit Daloze 2026-03-25 17:12:47 +01:00
  • 0d5c15a03e Add strict2_parse to assign and capture tags strict2-assign-capture Alok SwamyandClaude Opus 4.6 2026-03-24 18:19:22 -04:00
  • fd68d076dd Merge pull request #2038 from eregon/truffleruby-ci Kevin MenardandGitHub 2026-03-25 11:53:01 -04:00
  • 96aa47d13f Add TruffleRuby in CI Benoit Daloze 2026-01-16 00:24:42 +01:00
  • ad70c5c459 Improve no Symbol leak tests to be more reliable Benoit Daloze 2026-03-25 16:44:38 +01:00
  • d824de701c Adapt slice filter to work on non-64 bit platforms Benoit Daloze 2026-01-15 23:57:25 +01:00
  • 346166b600 Add for_loop? to Include tag for AST-based keyword detection strict2-include-tablerow Alok SwamyandClaude Opus 4.6 2026-03-23 12:15:03 -04:00
  • 532b439063 Reject bare-bracket syntax in strict2 and introduce self keyword Alok SwamyandClaude Opus 4.6 2026-03-18 12:15:37 -04:00
  • dd37353cca Merge pull request #2062 from Shopify/update-setup-ruby Alok SwamyandGitHub 2026-03-19 15:29:47 -04:00
  • e80f775f89 Update ruby/setup-ruby from v1.273.0 to v1.295.0 update-setup-ruby Alok SwamyandClaude Opus 4.6 2026-03-19 15:22:56 -04:00
  • 59d8d0d22d Add cumulative resource score tracking across partial renders (#2058) v5.12.0 Ian Ker-SeymerandGitHub 2026-03-18 11:54:46 -04:00
  • 3182b7c1b3 update autoresearch experiment log autoresearch/liquid-perf-2026-03-11 Tobi Lutke 2026-03-12 17:38:05 -04:00
  • b195d09212 Replace @blocks.each with while loop in If render — avoids block proc allocation per render\n\nResult: {"status":"keep","combined_µs":3496,"parse_µs":2356,"render_µs":1140,"allocations":24530} Tobi Lutke 2026-03-12 17:31:41 -04:00
  • db348e0dac Inline to_liquid_value in If render — avoids one method dispatch per condition evaluation\n\nResult: {"status":"keep","combined_µs":3459,"parse_µs":2318,"render_µs":1141,"allocations":24647} Tobi Lutke 2026-03-12 17:31:20 -04:00
  • 99454a9be2 Replace simple_lookup? byte scan with match? regex — 8x faster per call, cleaner code\n\nResult: {"status":"keep","combined_µs":3489,"parse_µs":2353,"render_µs":1136,"allocations":24647} Tobi Lutke 2026-03-12 17:27:17 -04:00
  • ca327b01b1 Condition#evaluate: skip loop block for simple conditions (no child_relation) — saves 235 allocs\n\nResult: {"status":"keep","combined_µs":3445,"parse_µs":2284,"render_µs":1161,"allocations":24647} Tobi Lutke 2026-03-12 17:24:51 -04:00
  • ae9a2e26b0 Clean confirmation run: 3,314µs (-55% from main), stable\n\nResult: {"status":"keep","combined_µs":3314,"parse_µs":2203,"render_µs":1111,"allocations":24882} Tobi Lutke 2026-03-12 17:22:24 -04:00
  • 46927b9e90 update autoresearch docs with current progress Tobi Lutke 2026-03-12 17:21:28 -04:00
  • f6baeaed1e parse_tag_token without StringScanner: pure byte ops avoid reset(token) overhead, -12% combined\n\nResult: {"status":"keep","combined_µs":3350,"parse_µs":2212,"render_µs":1138,"allocations":24882} Tobi Lutke 2026-03-12 17:17:10 -04:00
  • b37fa98c91 Clean up tokenizer: remove unused StringScanner setup and regex constants\n\nResult: {"status":"keep","combined_µs":3490,"parse_µs":2331,"render_µs":1159,"allocations":24882} Tobi Lutke 2026-03-12 17:12:08 -04:00
  • e25f2f1d52 Confirmation run: byteindex tokenizer consistently 3,400-3,600µs\n\nResult: {"status":"keep","combined_µs":3464,"parse_µs":2335,"render_µs":1129,"allocations":24882} Tobi Lutke 2026-03-12 17:11:29 -04:00
  • b7ae55f7a9 Replace StringScanner tokenizer with String#byteindex — 12% faster parse, no regex overhead for delimiter finding\n\nResult: {"status":"keep","combined_µs":3556,"parse_µs":2388,"render_µs":1168,"allocations":24882} Tobi Lutke 2026-03-12 17:11:15 -04:00
  • c09e722f9b Baseline: 3,818µs combined, 24,881 allocs\n\nResult: {"status":"keep","combined_µs":3818,"parse_µs":2722,"render_µs":1096,"allocations":24881} Tobi Lutke 2026-03-12 16:48:10 -04:00
  • 8f2f0ee035 Skip context.evaluate for String lookup keys in VariableLookup — avoids respond_to? dispatch\n\nResult: {"status":"keep","combined_µs":4103,"parse_µs":2881,"render_µs":1222,"allocations":24881} Tobi Lutke 2026-03-11 10:52:07 -04:00
  • 38d8055c3b update autoresearch.md with current progress Tobi Lutke 2026-03-11 10:51:39 -04:00
  • 228ecdb6a2 Cache no-arg filter tuples [name, EMPTY_ARRAY] — reuse frozen tuples across templates\n\nResult: {"status":"keep","combined_µs":4147,"parse_µs":2992,"render_µs":1155,"allocations":24881} Tobi Lutke 2026-03-11 10:49:44 -04:00
  • 76afdf154f Replace manual blank_string? with regex match — cleaner code\n\nResult: {"status":"keep","combined_µs":4196,"parse_µs":3042,"render_µs":1154,"allocations":25535} Tobi Lutke 2026-03-11 10:44:43 -04:00
  • 22b5ff1587 Skip to_liquid_value for String/Integer keys in VariableLookup — avoids respond_to? dispatch\n\nResult: {"status":"keep","combined_µs":4131,"parse_µs":2893,"render_µs":1238,"allocations":25535} Tobi Lutke 2026-03-11 10:44:05 -04:00
  • 1a019151eb Minor cleanup: optimize expect_id with while loop and early return\n\nResult: {"status":"keep","combined_µs":4184,"parse_µs":2921,"render_µs":1263,"allocations":25535} Tobi Lutke 2026-03-11 10:43:20 -04:00
  • 71e22e6a84 Replace manual scan_dotted_id with regex\n\nResult: {"status":"keep","combined_µs":4121,"parse_µs":2812,"render_µs":1309,"allocations":25535} Tobi Lutke 2026-03-11 10:42:07 -04:00
  • fd4a7af290 Replace manual scan_quoted_string with regex capture groups\n\nResult: {"status":"keep","combined_µs":4102,"parse_µs":2849,"render_µs":1253,"allocations":25535} Tobi Lutke 2026-03-11 10:41:44 -04:00
  • e15b163f1a Replace manual rest_blank? with regex skip + eos? check\n\nResult: {"status":"keep","combined_µs":4047,"parse_µs":2795,"render_µs":1252,"allocations":25535} Tobi Lutke 2026-03-11 10:41:20 -04:00
  • 11c22eb75d Replace manual scan_comparison_op with regex — cleaner and avoids byteslice allocation for op strings\n\nResult: {"status":"keep","combined_µs":4007,"parse_µs":2808,"render_µs":1199,"allocations":25535} Tobi Lutke 2026-03-11 10:40:47 -04:00
  • f8b08b5b64 Replace manual scan_fragment/scan_quoted_string_raw/skip_fragment with regex — cleaner, same/better perf\n\nResult: {"status":"keep","combined_µs":4132,"parse_µs":2890,"render_µs":1242,"allocations":25535} Tobi Lutke 2026-03-11 10:40:10 -04:00
  • 6db20e908b Replace manual byte-level scan_number with regex — cleaner code, same performance\n\nResult: {"status":"keep","combined_µs":4184,"parse_µs":2931,"render_µs":1253,"allocations":25535} Tobi Lutke 2026-03-11 10:39:14 -04:00
  • ecc23184ce Replace manual byte-level scan_id/skip_id with regex — C-level StringScanner.scan is faster than Ruby-level byte scanning\n\nResult: {"status":"keep","combined_µs":4185,"parse_µs":2943,"render_µs":1242,"allocations":25535} Tobi Lutke 2026-03-11 10:37:09 -04:00
  • 4df608a12f Fast-path Hash lookups in VariableLookup#evaluate — skip respond_to? checks for Hash objects\n\nResult: {"status":"keep","combined_µs":4110,"parse_µs":2922,"render_µs":1188,"allocations":25535} Tobi Lutke 2026-03-11 10:35:29 -04:00
  • b058f79cbf Skip to_liquid/context= for primitives in VariableLookup#evaluate\n\nResult: {"status":"keep","combined_µs":4334,"parse_µs":3062,"render_µs":1272,"allocations":25535} Tobi Lutke 2026-03-11 10:32:37 -04:00
  • 94562eae32 Fast return for primitive types in find_variable — skip to_liquid and respond_to?(:context=)\n\nResult: {"status":"keep","combined_µs":4225,"parse_µs":3009,"render_µs":1216,"allocations":25535} Tobi Lutke 2026-03-11 10:31:59 -04:00
  • 0e84955531 Skip find_index when only one scope in find_variable — go straight to environments\n\nResult: {"status":"keep","combined_µs":4323,"parse_µs":3055,"render_µs":1268,"allocations":25535} Tobi Lutke 2026-03-11 10:31:35 -04:00
  • c4593ceeb6 Skip respond_to?(:context=) for primitive types in find_variable — avoids method lookup overhead\n\nResult: {"status":"keep","combined_µs":4207,"parse_µs":2943,"render_µs":1264,"allocations":25535} Tobi Lutke 2026-03-11 10:30:41 -04:00
  • 9e2937945b Use EMPTY_ARRAY for empty static_environments in Context — avoids 60 array allocs per render cycle\n\nResult: {"status":"keep","combined_µs":4262,"parse_µs":3079,"render_µs":1183,"allocations":25535} Tobi Lutke 2026-03-11 10:26:30 -04:00
  • cd308b8b01 Lazy @changes hash in Registers — only allocate when a register is actually written\n\nResult: {"status":"keep","combined_µs":4287,"parse_µs":3059,"render_µs":1228,"allocations":25595} Tobi Lutke 2026-03-11 10:25:29 -04:00
  • e3fc735de7 Cache block_delimiter strings per tag name — avoids repeated string interpolation\n\nResult: {"status":"keep","combined_µs":4372,"parse_µs":3127,"render_µs":1245,"allocations":25605} Tobi Lutke 2026-03-11 10:23:56 -04:00
  • 9af3ba3aa7 Lazy Context init: defer StringScanner and @interrupts array allocation until needed\n\nResult: {"status":"keep","combined_µs":4299,"parse_µs":3057,"render_µs":1242,"allocations":26015} Tobi Lutke 2026-03-11 10:22:29 -04:00
  • 99e55c2eb5 Cache small integer to_s (0-999): avoids 267 Integer#to_s allocations per render cycle\n\nResult: {"status":"keep","combined_µs":4158,"parse_µs":2920,"render_µs":1238,"allocations":26128} Tobi Lutke 2026-03-11 10:20:45 -04:00
  • b48615f4a7 Replace split+join in truncatewords with manual word scan — avoids array + string allocations\n\nResult: {"status":"keep","combined_µs":4280,"parse_µs":3009,"render_µs":1271,"allocations":26395} Tobi Lutke 2026-03-11 10:20:11 -04:00
  • 6723d4fa15 Extend fast-path filter parsing to handle comma-separated multi-arg filters (e.g. pluralize: 'item', 'items')\n\nResult: {"status":"keep","combined_µs":4266,"parse_µs":3032,"render_µs":1234,"allocations":26480} Tobi Lutke 2026-03-11 10:16:39 -04:00
  • c252d50aa0 Avoid expr_markup byteslice when name is entire markup string (no whitespace, no filters)\n\nResult: {"status":"keep","combined_µs":4277,"parse_µs":3057,"render_µs":1220,"allocations":27026} Tobi Lutke 2026-03-11 10:12:26 -04:00
  • a249010cef Fast-path single-arg filter parsing: handle quoted strings, numbers, identifiers without Lexer/Parser\n\nResult: {"status":"keep","combined_µs":4427,"parse_µs":3181,"render_µs":1246,"allocations":27235} Tobi Lutke 2026-03-11 10:09:59 -04:00
  • 18a72db820 fix rubocop offenses: autocorrect style/layout violations Tobi Lutke 2026-03-11 09:53:44 -04:00
  • 1f59732aee update autoresearch.md with full progress log Tobi Lutke 2026-03-11 09:24:26 -04:00
  • cdc34388e3 For tag: migrate lax_parse to Cursor with zero-alloc skip_id/expect_id Tobi Lutke 2026-03-11 09:19:59 -04:00
  • bf1f5cb62d Cursor: add skip_id, expect_id, skip_fragment for zero-alloc scanning Tobi Lutke 2026-03-11 09:19:27 -04:00
  • 0596591fdf REVERTED: Cursor for For tag adds 148 allocs from scan_id/scan_fragment string creation\n\nResult: {"status":"discard","combined_µs":5049,"parse_us":3765,"render_us":1284,"allocations":29793,"parse_µs":3765,"render_µs":1284} Tobi Lutke 2026-03-11 09:18:35 -04:00
  • dd4a100346 remove dead BlockBody.parse_tag_token and If SIMPLE_CONDITION - now in Cursor Tobi Lutke 2026-03-11 09:17:29 -04:00
  • 9de1527099 introduce Cursor class: centralize byte-level scanning for tag/variable/condition parsing Tobi Lutke 2026-03-11 09:15:21 -04:00
  • 091534f981 add parse_simple to skip simple_lookup? check when caller validates Tobi Lutke 2026-03-11 09:10:05 -04:00
  • 0b07487e0c fast-path VariableLookup init: skip scan_variable for simple identifier chains Tobi Lutke 2026-03-11 09:08:44 -04:00
  • 3799d4c488 avoid allocating seen={} hash in Utils.to_s/inspect when not needed Tobi Lutke 2026-03-11 09:02:42 -04:00
  • c4186a16fc update autoresearch.sh: 3-run best-of, skip liquid-spec for speed Tobi Lutke 2026-03-11 09:01:57 -04:00
  • b90d7f0a08 optimize Context init: avoid unnecessary array wrapping for environments Tobi Lutke 2026-03-11 08:56:45 -04:00
  • 405e3dca48 use frozen EMPTY_ARRAY/EMPTY_HASH for Context @filters/@disabled_tags Tobi Lutke 2026-03-11 08:55:55 -04:00
  • 69430e9a88 replace INTEGER_REGEX/FLOAT_REGEX with byte-level parse_number Tobi Lutke 2026-03-11 08:54:31 -04:00
  • 79840b1eaa replace SIMPLE_CONDITION regex with manual byte parser in if/elsif lax_parse Tobi Lutke 2026-03-11 08:52:49 -04:00