Clang+LLVM

Article: Bulldozer Benchmarks, What Do They Mean?
By: ? (0xe2.0x9a.0x9b.delete@this.gmail.com), April 14, 2011 11:56 pm
Room: Moderated Discussions
Linus Torvalds (torvalds@linux-foundation.org) on 4/14/11 wrote:
---------------------------
>Rob Thorpe (rthorpe@robertthorpeconsulting.com) on 4/14/11 wrote:
>>
>>As far as I can see all you're saying here is that "there must be problems" but
>>you haven't actually tried it or read or talked to anyone that has.
>
>Umm.
>
>The shoe is on the other foot, Rob.
>
>I can speak from experience from writing my own
>parsers being recursive-descent, and seeing other projects
>that do C compilers do the same.

I wanted to write my reaction to your posts yesterday, but that somehow didn't materialize. Well, better writing it later than never.

I am not going to spend my words on the subject of "precompiled headers are impossible". If that's what you believe, fine.

Now back to parsing. The point I want to make in relation to parsing is basically this: creating a parser generator is a *simple* task. TO WRITE A PARSER GENERATOR IS SIMPLER THAN WRITING A PARSER BY HAND.

If the language is big (like C/C++ for example), it is more efficient to write a new language-specific parser generator - instead of writing a parser by hand in an imperative language.

It is more efficient due to multiple reasons:

1. Smaller number of characters the programmer has to write in comparison to a hand-written parser. This increases programmer productivity, and decreases the number of programming errors.

2. Safety: the generator will verify that the parsed grammar is sane. If you write your own parser by hand, you will have no idea whether the parser is correct. You can of course run tests, but testing is not quite the same thing as verification.

3. Speed: the generated parser can be a bit faster. For example, in some places where your hand-written parser descends into a new function, the generated parser uses a state machine. Note that this is just one example, there exist additional reasons why the generated parser might be faster.

Are you saying "meh" to all these points?

>If you want to argue for generated parsers, the onus is
>on you to show how good they are, and how they perform
>well.

Err, no. The onus is on you to show that you are capable of writing a new parser generator by yourself. If you are incapable, then there is a high probability that you don't know what you are talking about. If you (and the GCC/Clang people) are incapable of writing a parser generator, then the reason why you/they are writing parsers by hand is not because hand-written parsers are superior, but simply because you/they don't have the intellectual capacity to write a new parser generator.

>And yes, I have used bison, and it's a f*cking pain.
>Exactly for the reasons I've outlined.

Forget Bison. Write your own parser generator - it is not hard.

>So yes, I've tried. And decided that it simply isn't worth
>my time or effort to use parser generators, when writing
>a parser by hand is relatively simple and avoids all the
>problems.

Well, I agree that using Bison on small languages may not be worth it.

You may now be thinking the "impedance" word. Well, but that is exactly what I am saying: the bigger and more complex the language the more incentive to forget Bison (because of the "impedance") and write your own parser generator.

>So Rob, as they say "Shut up or put up". You show me a
>project that bothered with a parser generator, and show me
>somebody who tells why it was worth it.

So it is "a bother" to you. Let me rephrase what you just wrote: "I am more than happy to spend countless hours writing, testing and maintaining a hand-written parser. Performing mindless repetitive tasks like a robot and a slave is no problem to me. It is better than automating the task."

Is that what you are saying?

>I've told you why I don't think it is worth it, and unlike
>you, I can point to code I've written myself ("sparse":
>semantic analysis of kernel code) and major compiler
>projects by others (gcc and Clang) to support that whole
>"generated parsers aren't worth the pain" argument.
>
>Linus

I will believe you if you persuade me that you are capable of writing a new parser *generator* by yourself.
< Previous Post in ThreadNext Post in Thread >
TopicPosted ByDate
New article: Bulldozer benchmark analysisDavid Kanter2011/03/30 02:27 AM
  New article: Bulldozer benchmark analysisNaN2011/03/30 07:47 AM
    New article: Bulldozer benchmark analysisDavid Kanter2011/03/30 09:25 AM
      New article: Bulldozer benchmark analysisdc2011/03/30 12:07 PM
      New article: Bulldozer benchmark analysisFoo_2011/03/30 12:17 PM
        New article: Bulldozer benchmark analysisDavid Kanter2011/03/30 01:34 PM
          BD won't "kick in" until 2.5GHzBaronMAtrix2011/03/31 08:37 AM
            BD won't "kick in" until 2.5GHzDavid Kanter2011/03/31 09:21 AM
              He is an AMDZone lunaticNIKOLAS2011/04/01 06:40 AM
                See how he behaves hereDavid Kanter2011/04/01 08:08 AM
                He is an AMDZone lunatichorsefly2011/04/02 05:46 AM
                  This is not relevantDavid Kanter2011/04/02 09:16 AM
                  Post removedDavid Kanter2011/04/02 12:39 PM
          New article: Bulldozer benchmark analysisanonymous2011/04/04 05:08 AM
      New article: Bulldozer benchmark analysisinterested2011/04/01 03:28 PM
        New article: Bulldozer benchmark analysisDavid Kanter2011/04/01 03:53 PM
          New article: Bulldozer benchmark analysisNaN2011/04/02 07:12 AM
            New article: Bulldozer benchmark analysisDavid Kanter2011/04/02 09:05 AM
              New article: Bulldozer benchmark analysisNaN2011/04/02 09:24 AM
                New article: Bulldozer benchmark analysisDavid Kanter2011/04/02 12:36 PM
                  AMD's Open64 compiler ?Alex2011/04/04 02:23 AM
                    AMD's Open64 compiler ?David Kanter2011/04/04 08:19 AM
                      AMD's Open64 compiler ?Richard Cownie2011/04/04 09:52 AM
                        AMD's Open64 compiler ?David Kanter2011/04/04 01:20 PM
                          AMD's Open64 compiler ?none2011/04/04 02:25 PM
                        AMD's Open64 compiler ?gallier22011/04/04 11:06 PM
                          thanks, very interesting (NT)Richard Cownie2011/04/05 03:44 AM
                          AMD's Open64 compiler ?Andreas Stiller2011/04/05 08:23 AM
                        AMD's Open64 compiler ?Vincent Diepeveen2011/04/06 01:11 AM
                      AMD's Open64 compiler ?Vincent Diepeveen2011/04/06 01:01 AM
                        AMD's Open64 compiler ?none2011/04/06 01:41 AM
                          AMD's Open64 compiler ?Vincent Diepeveen2011/04/07 02:02 PM
                            AMD's Open64 compiler ?Brett2011/04/07 04:55 PM
                              AMD's Open64 compiler ?Megol2011/04/09 11:03 AM
                                Clang+LLVMBrett2011/04/11 10:51 PM
                                  Clang+LLVMRob Thorpe2011/04/12 12:52 AM
                                    Clang+LLVMBrett2011/04/12 08:27 PM
                                      I prefer my dollars exponential, not cubic (NT)David Kanter2011/04/12 11:34 PM
                                        I prefer cubic meters of euros over cubic feet of dollarsJouni Osmala2011/04/13 01:13 AM
                                          Life is not about money, but about power (and informational asymetry)?2011/04/18 01:14 AM
                                      Clang+LLVMRob Thorpe2011/04/13 10:37 AM
                                        Clang+LLVMLinus Torvalds2011/04/13 11:47 AM
                                          Clang+LLVMRob Thorpe2011/04/13 01:46 PM
                                            Clang+LLVMLinus Torvalds2011/04/13 04:40 PM
                                              Clang+LLVManon2011/04/13 07:31 PM
                                                Clang+LLVMLinus Torvalds2011/04/14 06:11 AM
                                              Clang+LLVMRob Thorpe2011/04/14 12:33 PM
                                                Clang+LLVMLinus Torvalds2011/04/14 12:48 PM
                                                  Clang+LLVMAndi Kleen2011/04/14 06:38 PM
                                                    Clang+LLVMJouni Osmala2011/04/14 09:54 PM
                                                  Clang+LLVM?2011/04/14 11:56 PM
                                                    Clang+LLVMLinus Torvalds2011/04/15 06:23 AM
                                                      Clang+LLVM?2011/04/15 10:11 PM
                                                        Clang+LLVMLinus Torvalds2011/04/16 08:10 AM
                                                          Clang+LLVMLinus Torvalds2011/04/16 08:32 AM
                                                            Competing for speed?2011/04/16 11:47 PM
                                                            Clang+LLVMEduardoS2011/04/17 12:38 PM
                                                              Clang+LLVMLinus Torvalds2011/04/17 02:00 PM
                                                                Competing for speed?2011/04/17 10:57 PM
                                                                  Competing for speedLinus Torvalds2011/04/18 09:07 AM
                                                                    Competing for speedanon2011/04/18 05:38 PM
                                                                      Competing for speedLinus Torvalds2011/04/18 07:24 PM
                                                                        Competing for speedanon2011/04/19 05:05 AM
                                                                          Competing for speedanon2011/04/21 01:35 PM
                                                                            Competing for speedLinus Torvalds2011/04/22 11:09 AM
                                                                    Competing for speed?2011/04/18 11:45 PM
                                                                      Competing for speedLinus Torvalds2011/04/19 06:41 AM
                                                                        Competing for speedLinus Torvalds2011/04/19 07:46 AM
                                                                        Oh ... the irony?2011/04/19 10:36 AM
                                                                          Oh ... the ironyLinus Torvalds2011/04/19 01:49 PM
                                                                            What's the speedup?iz2011/04/19 10:54 PM
                                                                              What's the speedup?Linus Torvalds2011/04/20 06:48 AM
                                                                            Oh ... the irony?2011/04/23 05:52 AM
                                                                          Oh ... the ironyDougal2011/04/20 06:23 AM
                                                                            Oh ... the irony?2011/04/25 12:05 PM
                                                                              Oh ... the ironyDougal2011/04/26 05:22 AM
                                                                                Oh ... the irony?2011/04/27 12:14 AM
                                                  Clang+LLVMRob Thorpe2011/04/16 01:23 PM
                                                    Clang+LLVManon2011/04/16 03:01 PM
                                                      Clang+LLVMRob Thorpe2011/04/18 04:53 AM
                                                        Clang+LLVManon2011/04/18 05:28 PM
                                        Clang+LLVMPaul2011/04/14 10:43 AM
                                  Clang+LLVMFoo_2011/04/12 05:36 AM
                              AMD's Open64 compiler ?Paul2011/04/10 02:50 AM
                                C++ front-endsDavid Kanter2011/04/10 06:29 AM
                                  C++ front-endsPaul2011/04/10 07:19 AM
                                    C++ front-endsanonymous2011/04/10 07:28 AM
                                      C++ front-endsnone2011/04/10 07:36 AM
                                      C++ front-endsPaul2011/04/10 07:44 AM
                                    C++ front-endsMichael S2011/04/10 07:47 AM
                                      C++ front-endsnone2011/04/10 07:51 AM
                                      C++ front-endsRob Thorpe2011/04/10 11:13 AM
                                        C++ front-endsPaul2011/04/11 10:07 AM
                                AMD's Open64 compiler ?Konrad Schwarz2011/04/14 01:06 AM
                              Testing Clang + LLVMVincent Diepeveen2011/04/20 06:31 AM
                                Does your program crash when compiled with -O0? (NT)Michael S2011/04/20 10:11 AM
                                  Does your program crash when compiled with -O0? (NT)Vincent Diepeveen2011/04/20 11:33 AM
                                Testing Clang + LLVMMegol2011/04/20 11:05 AM
                                  Testing Clang + LLVMVincent Diepeveen2011/04/20 11:43 AM
                                    Testing Clang + LLVMstubar2011/04/20 12:23 PM
                                      Testing Clang + LLVMVincent Diepeveen2011/04/20 12:42 PM
                                        Testing Clang + LLVMRob Thorpe2011/04/20 02:30 PM
                                          Testing Clang + LLVMahnoun2011/04/20 03:13 PM
                                            Testing Clang + LLVMMark Roulo2011/04/20 04:05 PM
                                              Testing Clang + LLVMMegol2011/04/22 04:30 AM
                                    Testing Clang + LLVMahnoun2011/04/20 02:31 PM
                                      Testing Clang + LLVMVincent Diepeveen2011/04/21 02:17 AM
                                        Testing Clang + LLVMnone2011/04/21 02:36 AM
                                        Testing Clang + LLVMahnoun2011/04/21 11:02 AM
                                          Testing Clang + LLVMMichael S2011/04/21 12:01 PM
                                            Testing Clang + LLVMMichael S2011/04/21 03:29 PM
                                              Testing Clang + LLVMBrett2011/04/21 04:49 PM
                                              Testing Clang + LLVMEduardoS2011/04/22 02:22 PM
                                                Testing Clang + LLVMMichael S2011/04/23 09:59 AM
                                            Testing Clang + LLVMDavid Ball2011/04/21 06:43 PM
                                Testing Clang + LLVMBrett2011/04/20 12:54 PM
                            AMD's Open64 compiler ?Megol2011/04/09 10:49 AM
                              Imperative compilers (and the lack of it)?2011/04/10 12:36 AM
                                Imperative compilers (and the lack of it)?2011/04/10 12:43 AM
                                Imperative compilers (and the lack of it)Paul2011/04/10 02:37 AM
                                  Imperative compilers (and the lack of it)?2011/04/10 05:30 AM
                                  Imperative compilers (and the lack of it)Vincent Diepeveen2011/04/10 06:20 AM
                                  Imperative compilers (and the lack of it)Gabriele Svelto2011/04/11 08:24 AM
                                  Imperative compilers (and the lack of it)Michael S2011/04/12 12:12 AM
                                    Imperative compilers (and the lack of it)?2011/04/12 01:41 AM
                                      Imperative compilers (and the lack of it)EduardoS2011/04/12 03:13 PM
                                        U+269BMichael S2011/04/13 12:45 AM
                                          U+269B?2011/04/13 03:52 AM
                                            U+269BBrendan2011/04/20 07:18 AM
                                              U+269BMichael S2011/04/20 09:11 AM
                                                U+269BHeath Provost2011/04/20 10:26 AM
                                                  You are right, Heath. Sorry, Brannon.Michael S2011/04/20 10:42 AM
                                                    Sorry again, Brendan (NT)Michael S2011/04/20 10:43 AM
                                                    Testing western non-us letters.Jouni Osmala2011/04/20 09:41 PM
                                                      Those show up fine to me (NT)David Kanter2011/04/21 07:48 AM
                                                      Testing western non-us letters.Heath Provost2011/04/21 11:15 AM
                                                        Testing western non-us letters.EduardoS2011/04/22 02:14 PM
                                                          Testing western non-us letters.Heath Provost2011/04/22 03:21 PM
                                                            Testing western non-us letters.EduardoS2011/04/22 04:24 PM
                                                            We actually upgraded to 2008 R2David Kanter2011/04/22 10:23 PM
                                                              We actually upgraded to 2008 R2EduardoS2011/04/22 10:33 PM
                                                                We actually upgraded to 2008 R2rwessel2011/04/22 11:11 PM
                                                                  We actually upgraded to 2008 R2David Kanter2011/04/22 11:28 PM
                                                                    We actually upgraded to 2008 R2Ricardo B2011/04/23 09:43 AM
                                                                      We actually upgraded to 2008 R2David Kanter2011/04/23 10:31 AM
                                                                    We actually upgraded to 2008 R2sparkplug2011/04/23 08:25 PM
                                                                      We actually upgraded to 2008 R2David Kanter2011/04/24 03:36 PM
                                                                        We actually upgraded to 2008 R2anon2011/04/24 06:32 PM
                                                                          We actually upgraded to 2008 R2David Kanter2011/04/24 11:12 PM
                                                                        We actually upgraded to 2008 R2EduardoS2011/04/24 08:10 PM
                                                                          We actually upgraded to 2008 R2David Kanter2011/04/24 11:04 PM
                                                                        We actually upgraded to 2008 R2anonymous2011/04/24 08:44 PM
                                                                          We actually upgraded to 2008 R2David Kanter2011/04/24 10:57 PM
                                                                        File size optimizationsjrl2011/04/25 02:03 AM
                                                                          File size optimizationsRicardo B2011/04/25 07:14 AM
                                                                            File size optimizationsjrl2011/04/25 05:52 PM
                                                                          File size optimizationsDavid Kanter2011/04/25 07:49 AM
                                                                            File size optimizationsRicardo B2011/04/25 08:22 AM
                                                                              ContinuationRicardo B2011/04/25 08:25 AM
                                                                              File size optimizationsChristian Packmann2011/04/25 09:56 AM
                                                                                File size optimizationsEduardoS2011/04/25 11:57 AM
                                                                                  File size optimizationsRicardo B2011/04/25 01:01 PM
                                                                            File size optimizationsEduardoS2011/04/25 12:01 PM
                                                                            Javascript is at the root of the latency problemjrl2011/04/25 06:03 PM
                                                                          File size optimizationsEduardoS2011/04/25 12:14 PM
                                                                            File size optimizationsrwessel2011/04/25 12:49 PM
                                                                              File size optimizationsEduardoS2011/04/25 12:57 PM
                                                                            File size optimizationsjrl2011/04/25 05:54 PM
                                                                              A simple approachSilent2011/04/25 09:24 PM
                                                                                Show Thread exists but the default is Yes (NT)Silent2011/04/25 09:26 PM
                                                                          File size optimizationsHeath Provost2011/04/25 02:02 PM
                                    Imperative compilers (and the lack of it)Azazel2011/04/12 08:23 PM
                                Imperative compilers (and the lack of it)none2011/04/10 06:00 AM
                                  Imperative compilers (and the lack of it)dmsc2011/04/10 06:39 AM
                                  Imperative compilers (and the lack of it)EduardoS2011/04/10 12:55 PM
                                compiler failure rateshobold2011/04/10 10:55 AM
                                  compiler failure rates?2011/04/10 11:13 PM
                                    compiler failure rateshobold2011/04/11 05:07 AM
                                Imperative compilers (and the lack of it)EduardoS2011/04/10 12:55 PM
                                  Imperative compilers (and the lack of it)?2011/04/10 11:13 PM
                                    Imperative compilers (and the lack of it)Konrad Schwarz2011/04/14 01:28 AM
                                      Imperative compilers (and the lack of it)gallier22011/04/14 04:47 AM
                                      Imperative compilers (and the lack of it)EduardoS2011/04/14 02:04 PM
                                        Imperative compilers (and the lack of it)Konrad Schwarz2011/04/15 03:43 AM
                                Hard register problemsRob Thorpe2011/04/11 12:14 AM
                                  Hard register problemsMax2011/04/11 03:05 PM
                                    Hard register problemsRob Thorpe2011/04/11 03:28 PM
                                Imperative compilers (and the lack of it)gallier22011/04/11 09:26 AM
                                  I wonder why.j2011/04/11 10:39 PM
                                    I wonder why.?2011/04/11 11:44 PM
                                Imperative compilers (and the lack of it)nksingh2011/04/12 11:00 PM
                                  Imperative compilers (and the lack of it)?2011/04/12 11:23 PM
                              AMD's Open64 compiler ?Vincent Diepeveen2011/04/10 06:06 AM
                                AMD's Open64 compiler ?none2011/04/10 07:23 AM
                                  AMD's Open64 compiler ?Eugene Nalimov2011/04/11 03:57 PM
                                    AMD's Open64 compiler ?EduardoS2011/04/12 02:55 PM
                                AMD's Open64 compiler ?Megol2011/04/10 11:05 PM
                                  AMD's Open64 compiler ?Vincent Diepeveen2011/04/20 12:52 PM
                                    Yap transform? What is it? (NT)Michael S2011/04/21 09:04 AM
                                      Yap transform? What is it? (NT)Vincent Diepeveen2011/04/22 02:56 AM
                    AMD's Open64 compiler ?Vincent Diepeveen2011/04/05 12:02 PM
    New article: Bulldozer benchmark analysisNaN2011/03/30 05:24 PM
      New article: Bulldozer benchmark analysisChris2011/04/05 03:33 AM
  New article: Bulldozer benchmark analysisdc2011/03/30 08:09 AM
    New article: Bulldozer benchmark analysisMS2011/03/30 08:53 AM
      New article: Bulldozer benchmark analysisDaniel Bizo2011/03/31 12:20 AM
        New article: Bulldozer benchmark analysisanun2011/03/31 02:48 AM
    New article: Bulldozer benchmark analysisAlex2011/03/30 09:18 AM
      New article: Bulldozer benchmark analysisIntelUser20002011/03/30 01:19 PM
    New article: Bulldozer benchmark analysisGroo2011/03/31 06:14 AM
      New article: Bulldozer benchmark analysisanon2011/03/31 08:29 AM
        AMD's memory controllers are fineDavid Kanter2011/03/31 09:27 AM
          AMD's memory controllers are fineanon2011/04/05 11:24 AM
            AMD's memory controllers are fineanon2011/04/05 04:52 PM
              AMD's memory controllers are fineVincent Diepeveen2011/04/06 01:36 AM
                AMD's memory controllers are fineanon2011/04/06 06:59 AM
                  AMD's memory controllers are fineVincent Diepeveen2011/04/07 02:15 PM
                    AMD's memory controllers are fineVincent Diepeveen2011/04/07 02:27 PM
                      AMD's memory controllers are fineanon2011/04/07 02:57 PM
                    AMD's memory controllers are fineanon2011/04/07 02:54 PM
        New article: Bulldozer benchmark analysisAzazel2011/03/31 09:54 AM
        New article: Bulldozer benchmark analysisAlex2011/03/31 11:38 PM
      New article: Bulldozer benchmark analysisanon2011/04/01 03:23 AM
    Streaming conflicts can lead to performance degradationsgc2011/04/08 06:35 AM
  AMD's probe filterAndreas Stiller2011/04/05 08:37 AM
  a waste of timeMoritz2011/04/09 07:01 AM
    a waste of timehorsefly2011/04/09 03:34 PM
      a waste of timeDavid Kanter2011/04/09 06:56 PM
        a waste of timehorsefly2011/04/10 05:13 AM
          InvestorsDavid Kanter2011/04/10 06:27 AM
Reply to this Topic
Name:
Email:
Topic:
Body: No Text
How do you spell tangerine? ūüćä