The functions in pandoc.layout call into Haskell, which makes them
slower than normal Lua functions. Lua strings are treated as if they
were created with literal by all these functions, making the calls
redundant.
This change reduces the writer's run-time by about ⅓ in my tests.
The functions in
pandoc.layout
call into Haskell, which makes them slower than normal Lua functions. Lua strings are treated as if they were created withliteral
by all these functions, making the calls redundant.This change reduces the writer's run-time by about ⅓ in my tests.