An XSLT Compiler written in XSLT: can it perform?
summary
A working XSLT compiler written in XSLT compiles itself into a SEF file (~4 MB) and passes about 95% of tests; initial performance is 240 ms for the Java compiler, ~2040 ms when self-compiling on Java and ~90 s in Chrome. Optimization uses eager and lazy evaluation of XPath static context, memoization, token-dictionary shortcuts for short XPaths, a preorder import‑precedence algorithm, a compact sequence-type encoding, and limited multithreading (threads=8). Final measured self-compile on Java falls to ~550 ms and diagnostics improve.
AI-written summary · about
chapters (17)
- 0:00Intro
- 2:02What does the compiler do
- 8:50Whats interesting
- 9:45Differences between Java and XSLT
- 13:18Performance engineering process
- 15:10The wrong task
- 20:00Measuring performance
- 22:20TP
- 24:34Java Profiler
- 27:11Subtractive Measurement
- 28:39repeatability of measurement
- 29:44XPath evaluation
- 31:01Next phase
- 31:38Tree copying
- 33:38Algorithms
- 35:31Multithreading
- 37:08Questions
