llama 3.3 70b perplexity on code with builder pattern vs procedural - builder holds 2.4k longer
tested this over the weekend with typescript. builder pattern (explicit method chaining with typed intermediate states) held coherence to 21.2k tokens. same logic written procedurally broke at 18.8k. this matches what people have been saying about explicit state machines - the builder pattern gives the model clear structure to anchor to at each step. curious if this applies to other patterns like fluent interfaces. quant: q4_k_m, llama.cpp b3891, temp 0.7, min_p 0.05
ok so did you measure at same token count or same line count? builder pattern probly uses more tokens
post token counts at same logic or it's noise
measured at same line count not token count. your right that builder pattern probly uses more tokens, ill rerun with same token count and post results
builder pattern uses way more tokens yeah. we measured this exact thing last month - same logic was 38% more tokens in builder vs procedural because of all the chaining and intermediate variable names. if you didnt control for token count the result is meaningless
this is meaningless without token counts. builder pattern burns way more tokens than procedural for the same logic - all the chaining, intermediate variables, method calls. if you measured at same line count you're just measuring token efficiency, not model coherence. rerun at exact same token count.