adamdruppe / adrdox

41 stars 15 forks source link

Add KaTeX option for TeX math #42

Closed katyo closed 4 years ago

katyo commented 4 years ago

Solution for #40

Missing:

adamdruppe commented 4 years ago

style note, static foreach is rarely necessary and can hurt compile times for no real benefit, i'd prolly just regular foreach

but since these are small loops it doesn't really make a difference either way.

katyo commented 4 years ago

Of course, I understand. If you mean the function which generates static array named filesForKaTeX, it evaluates in compile time anyway.

adamdruppe commented 4 years ago

On Sun, Aug 16, 2020 at 09:00:57AM -0700, Kayo Phoenix wrote:

If you mean the function which generates static array named filesForKaTeX, it evaluates in compile time anyway.

Yeah. Just static foreach means the compiler unrolls it, then optimizes it, then runs it... and in a lot of these cases, just running it is actually better.

For large programs, static foreach can get slow quickly.

Still it doesn't matter here just point it out for future knowledge.