Re: [Spirit-general] Re: [boost] Re: spirit and compile speed
On Fri, 10 Jan 2003 11:22:23 +, Vincent Finn wrote: >>>I have added 2 parsers to my code base and the compile time (VC6) has >>>gone from 10 mins to 30mins :-( >>At the very least, yes, you can separate the parsers from the project. >>How about writing some wrappers that *hides* the grammars in >>*.cpp files? You can for example have an opaque API in a header >>such as: >> >>bool parse(char const* source); > >That seems obvious now that you say it >I was thinking in terms of spliting spirit off which causes problems but >, as you say, all I need is to build a lib with my parser in so that >spirit is hidden. This is kind of late (a month), but if you want a working example of this, I just updated and checked in my C++ lexer example into the Boost CVS. The lexer itself is implemented using Spirit grammars, and it's separated from its users by an opaque interface kind of like the one Joel describes. Now I'm in the process of cleaning it up and adding a few features, like making it multi-layered (lexer -> preprocessor -> parser, with all the layers separated from each other), so I'll check it in as soon as I'm done. Salutaciones, JCAB email: [EMAIL PROTECTED] ICQ: 10913692 @WORK: 101728263 WWW: http://www.JCABs-Rumblings.com ___ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Re: [Spirit-general] Re: [boost] Re: spirit and compile speed
- Original Message - From: "Vincent Finn" <[EMAIL PROTECTED]> > I had a look at the mailing list but it comes up as read-only for me for > some reason? > I am logged in to Source Forge but haven't used it much > > as for the news group I subscribed to it (it appears in the list of > available news groups) but when I try to access it I'm told it doesn't > exist on the server ?? Hmmm... I'm not sure why. > >>>I have added 2 parsers to my code base and the compile time (VC6) has > >>>gone from 10 mins to 30mins :-( > >> > > Yes, this is the next battle. How big are your grammars? How many productions? > > Are you using subrules? Better yet, can I see your code? > > I can send a stripped down code (it'll take a while to put it together > so it'll be next week some time) > 3 question on that > 1) Would you prefer a direct mail with it or an atachment to the NG? > 2) Do you need tgz or is zip fine? > 3) Is a VC project file fine to show the compile setting I am using? Sure. No problem. A VC project file is Ok and zip is just fine. > This is another developers code but I made the call to use Spirit so I > have to do the optimising ! > so please bear with me if it takes a while for me to split it off :( I'd appreciate that a lot. This will help me fine tune Spirit and will be very useful in targetting the points where optimization is needed. > > At the very least, yes, you can separate the parsers from the project. > > How about writing some wrappers that *hides* the grammars in > > *.cpp files? You can for example have an opaque API in a header > > such as: > > > > bool parse(char const* source); > > That seems obvious now that you say it > I was thinking in terms of spliting spirit off which causes problems but > , as you say, all I need is to build a lib with my parser in so that > spirit is hidden. > > Thanks for the quick response, Vin Most welcome! Regards, Joel de Guzman [EMAIL PROTECTED] http://www.boost-consulting.com ___ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Re: [boost] Re: spirit and compile speed
Joel de Guzman wrote: "Vincent Finn" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi, I assume this is the right place to post questions on Spirit now that it is part of boost! If not here, where? There's a Spirit specific mailing list that you can subscribe to here: https://lists.sourceforge.net/lists/listinfo/spirit-general This mailing list is also mirrored in gmane NTTP portal : news://news.gmane.org/gmane.comp.spirit.general I had a look at the mailing list but it comes up as read-only for me for some reason? I am logged in to Source Forge but haven't used it much as for the news group I subscribed to it (it appears in the list of available news groups) but when I try to access it I'm told it doesn't exist on the server ?? I have added 2 parsers to my code base and the compile time (VC6) has gone from 10 mins to 30mins :-( Yes, this is the next battle. How big are your grammars? How many productions? Are you using subrules? Better yet, can I see your code? I can send a stripped down code (it'll take a while to put it together so it'll be next week some time) 3 question on that 1) Would you prefer a direct mail with it or an atachment to the NG? 2) Do you need tgz or is zip fine? 3) Is a VC project file fine to show the compile setting I am using? It would be nice if you can send me a snapshot of your grammars (if possible) with a short main() driver code that invokes the parser(s). I'll also need some more info such as: processor speed and available memory as well as your command line parameters. This will give me some clues on where the compiler is choking. I'm running a P3 866, 512M Ram, NT4 SP6 This is another developers code but I made the call to use Spirit so I have to do the optimising ! so please bear with me if it takes a while for me to split it off :( At the very least, yes, you can separate the parsers from the project. How about writing some wrappers that *hides* the grammars in *.cpp files? You can for example have an opaque API in a header such as: bool parse(char const* source); That seems obvious now that you say it I was thinking in terms of spliting spirit off which causes problems but , as you say, all I need is to build a lib with my parser in so that spirit is hidden. Thanks for the quick response, Vin ___ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Re: [boost] Re: spirit and compile speed
- Original Message - From: "Thorsten Ottosen" <[EMAIL PROTECTED]> > "Vincent Finn" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > Hi, > > > > I assume this is the right place to post questions on Spirit now that it > > is part of boost! > > If not here, where? There's a Spirit specific mailing list that you can subscribe to here: https://lists.sourceforge.net/lists/listinfo/spirit-general This mailing list is also mirrored in gmane NTTP portal : news://news.gmane.org/gmane.comp.spirit.general Although I try my best to keep abreast with the latest boost posts in this list, sometimes, I get drowned and lose my pace. So there's a slight chance that I (and some other Spirit developers) might not notice your post. The Spirit list is relatively low traffic. > > My question is about compile speed. > > Is there any way to speed it up or at least seperate it from the project? > > > > I have added 2 parsers to my code base and the compile time (VC6) has > > gone from 10 mins to 30mins :-( Yes, this is the next battle. How big are your grammars? How many productions? Are you using subrules? Better yet, can I see your code? After the boost formal review, we are now concentrating on QOI issues. The most glaring are: 1) Compile time diagnostics 2) Compile speed. I think there's much room for improvement. We haven't started optimizing on compile time yet (as they say, optimize later). This is the first time a non-developer has noticed compile-speed problems. It would be nice if you can send me a snapshot of your grammars (if possible) with a short main() driver code that invokes the parser(s). I'll also need some more info such as: processor speed and available memory as well as your command line parameters. This will give me some clues on where the compiler is choking. At the very least, yes, you can separate the parsers from the project. How about writing some wrappers that *hides* the grammars in *.cpp files? You can for example have an opaque API in a header such as: bool parse(char const* source); or something more intricate depending on what you want to extract from the source. This was done, for example, in the C++ lexer. See the latest CVS snapshot. in directory: libs\spirit\example\application\cpp_lexer. You'll notice that the cpp_lexer.hpp header does not include any Spirit header. You can build separate DLLs or static libraries this way. > I love Spirit for its syntax and ease of use, but I must also admit that > compile times are´ > very long, even for debug builds. > > I think I read something about a debug mode in uBLAS which was used to > reduce compilation > time; Could something similar be done in Spirit? Right now, I am looking at MPL style performance tweaks such as loop unrolling. The Spirit subrule in particular, makes the compiler crawl. JCAB has reported compile times in hours(!) when subrules were being developed a few months ago. He has done some tweaks that reportedly eased this, but the tweaks, as of now, does not work on non-PTS compilers yet (i.e. CV6/7). And that's why I asked whether Vincent is useing subrules. That might be the problem and for that, I think I'll have a solution very soon. About "debug mode in uBLAS", can you give me some links? Thank you, Joel de Guzman [EMAIL PROTECTED] http://www.boost-consulting.com ___ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
[boost] Re: spirit and compile speed
"Vincent Finn" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi, > > I assume this is the right place to post questions on Spirit now that it > is part of boost! > If not here, where? > > My question is about compile speed. > Is there any way to speed it up or at least seperate it from the project? > > I have added 2 parsers to my code base and the compile time (VC6) has > gone from 10 mins to 30mins :-( I love Spirit for its syntax and ease of use, but I must also admit that compile times are´ very long, even for debug builds. I think I read something about a debug mode in uBLAS which was used to reduce compilation time; Could something similar be done in Spirit? regards Thorsten Ottosen ___ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost