warp: a fast C and C++ preprocessor

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Mon Mar 31 07:46:16 PDT 2014


On 3/30/14, 5:01 PM, Leandro Lucarella wrote:
> ixid, el 30 de March a las 20:04 me escribiste:
>> On Sunday, 30 March 2014 at 19:28:20 UTC, Walter Bright wrote:
>>> On 3/30/2014 10:08 AM, Kagamin wrote:
>>>> On Friday, 28 March 2014 at 21:16:29 UTC, Ali Çehreli wrote:
>>>>> It could be useful for me just this past week in a throw-away
>>>>> D program that I
>>>>> wrote (at work! :) ) to parse some C and C++ files very
>>>>> crudely.
>>>>
>>>> As I understand, a preprocessor works on macros only, the rest
>>>> is lexed minimally.
>>>
>>> Yes, it won't help much with the rest.
>>
>> Were those ycombinator performance figures putting warp someway
>> behind clang valid? Perhaps we should unleash a community effort to
>> match clang?
>
> I think that's pretty wasteful, why won't you just use clang? What's the
> point of competing with another opensource project (a very good one,
> that took a lot of men-hour to do a good C/C++ compiler, including the
> preprocessor). I understand Walter did this in a couple of weeks, clang
> have been developed for at least 7 years now, is totally understandable
> that clang outperforms warp, is enough merit for warp to outperform GCC.
> I mean, if someone wants to have fun, go ahead, but putting community
> effort on that where there are so many places that are more important to
> put the effort on seems a bit silly.

It's quite obvious. The D codebase is smaller and simpler than clang 
pp's and can be taken many places; the next thing I'll work on is 
multithreaded preprocessing that shares already opened files. One thing 
that is self-evident but the article could have stressed is that 
open-sourcing warp is the beginning, not the end of its lifecycle. 
There's a lot of improvements that are within easy reach for warp, and 
are easier to realize than for clang.

Andrei



More information about the Digitalmars-d-announce mailing list