Closed dy closed 4 years ago
<tag${'name'}.possibly${multi}#cluster
param${'name'}cluster=${'value'}c${'l'}uster
quoted="${'cluster'} ${'with'} ${null} > ${false}"
route=/${'cluster'}/too
${'anonymous'}param
...${{ spread: 'cluster' }}>
And ${'text'} clusters ${'too'} <${'with'}>nested</> tags
</>
1. functional
next
iterator abstracting away walking2. purely-functional
2.1 purely-functional-fast
−
indexOf
race vs regexp search − no caching :/3. indexof
! normalize input - get rid of newlines !
indexOf
andsplit
are lighting-fast −split
is slow, even slower withlimit
↑split
is still faster than manualindexofs
withslice
−while
,for
manual loops are medium (10x slower than natives) −search
,match
are slower thansplit
−3×indexOf
is ~20 times faster than regex (no matter precreated or not) − recursion is ~100 times slower than simple while loop :( − simple fn call is not that bad as recursion ! flash-forward by one char (faster and anyways you'd walk the same with htm's each-character-matching strategy) ! clusters-associated knowledge. ! mergei, j
into a single numeric coordinate (comparable) ! put fields as private unicodes in a single string. ✔ no recursion − field placeholder4. [htm boosted]()
5. Iterative reactor
next
in pure functional ✔~ unicode and back conversion creates unnecessary slow down and bloated code, bringing it to 590kb. Ideal structure seems to be a meta-path, walked by the depth of modes (modes are indeed related by semantic depth).
6. Metamodes
text, field, text, tag, space, name, space, value, space, name,..., text, ...
if (char === '>') text()
8. Regex