This is the mail archive of the guile@cygnus.com mailing list for the guile project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
hjstein@bfr.co.il (Harvey J. Stein) writes: > However, it's much easier to write specific dumpers for specific > situations than to write a generic unexec. In your particular case, > why not write something to do a binary dump of the DFA to a file, & > read it back in when you restart? Pickling & unpickling specific > data structures when you know their pointers is *much* easier than > writing a generic unexec. You're right. This does make things a bit limiting as far as extensions go (that is, using guile extensions as opaque data) --- if a data structure is to be pickled, then it must be possible to pickle anything it refers to. This almost has to be a linguistic thing. If "read" could be extended to handle this for user smobs, this might almost be feasible. > I don't understand a couple of comments you made, though: I should point out that I don't really understand the lang code; I just tuned it up to work on a modern guile. > 1. Are you saying that most of the time is spent in a C fcn which > initializes the DFA as opposed to Scheme code calling C code > over & over to generate the DFA? There is at least one long interval in which we're deep inside C code, grinding away. > 2. I wrote a Pascal header parser using Bigloo and I never had > anything even remotely resembling 15 minutes to startup. And this > was before compilation. Why is the language parsing code taking so > long to generate the DFA? I don't know how elaborate your header parser was. This is the parser for CTAX, a language syntactically about as complex as C. The lexer is part of the startup time, and the laily-constructed parser data structures are the other part. It's worth pointing out that the machine is an ancient 386 with 8 megs of RAM, so it's not the speediest, especially when swapping. You can test this yourself with the guile-lang-allover package. It will boot up quickly but the first expression it tries to ctax-read will take some computing. I should look at Bigloo; maybe the lang package should be rewritten. Andrew