nemesis <nam### [at] gmailcom> wrote:
> That's unexpected.
> From just the looks of it, the SDL parser seems so straightforward that
> it's difficult to reason where any slowness could be coming from.
It's not difficult at all:
1) SDL is not byte-compiled. It's parsed&interpreted on the fly.
2) SDL loops are implemented by seeking the input file and continuing
the parsing from there. No caching of previously-parsed code of any kind.
So not only do you get the overhead of re-parsing the code every time
it loops, you always get the same file I/O overhead.
Another issue is that I wouldn't be surprised if the *parsing* itself is
faster in the perl interpreter than in povray. What looks "straightforward"
to you might still not be the fastest way of parsing, tokenizing and
interpreting the code.
> What you did was just measure SDL's slow macro processing
What "macro processing"? I didn't use any macros.
--
- Warp
Post a reply to this message
|