Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yes lots of caveats... but it works for Ruby in practice, often getting 10x on template rendering workloads.

Particularly, you 'actually...' me about how fetch and store dominates... but we're not storing anything into existing memory! To concatenate strings we only create new nodes and refer to the old nodes. You don't even need to read what's in the existing nodes! The essential fast-path of building up a template is write-only with bump-allocation into the extremely well-managed TLAB. No reading required. That's why it works so well.

Yes traversing the tree means writing it out is a little slower, but that's one small part at the end, with good pre-fetching opportunities.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: