Friday, March 19, 2010

Time to switch to clang

I actually wanted to start using clang a long time ago, but it didn't give enough warnings. Many important warnings, like not verifying printf() parameters, were completely missing. So I kept using gcc..

But in last few days this one guy started adding support for the missing gcc warnings. I also found out that printf() warnings were added within last few months also. So it looks like clang is finally potentially usable! I still have to actually start developing with it, but it looks promising.

This picture shows how much better clang's error and warning handling is compared to gcc.

I also did a few benchmarks with Dovecot:


  • Dovecot compiled about 10% faster with clang. Based on clang's web page I expected much more, but I guess it's better than nothing.. (I used configure --enable-optimizations, didn't change anything else)

  • Dovecot ran about 7% faster when I/O wasn't the limit (SSD disk, fsync_disable=yes).



Here's how I tested the 7% speed improvement (Dovecot v2.0 hg, Maildir):


imaptest seed=123 secs=300 msgs=100 delete=10 expunge=10 logout=1

1)
gcc version 4.4.3 20100108 (prerelease) (Debian 4.4.2-9)

Logi List Stat Sele Fetc Fet2 Stor Dele Expu Appe Logo
100% 50% 50% 100% 100% 100% 50% 10% 10% 100% 1%
30% 5%
674 31545 31442 674 63169 90559 30029 5419 6332 19773 1348
646 31725 31640 646 63270 90160 29987 5403 6163 20224 1292

2)
clang version 1.5 (trunk 98979)
Target: x86_64-unknown-linux-gnu

Logi List Stat Sele Fetc Fet2 Stor Dele Expu Appe Logo
100% 50% 50% 100% 100% 100% 50% 10% 10% 100% 1%
30% 5%
693 33927 33765 693 68032 96951 32356 5691 6786 21034 1386
674 33990 34027 674 68018 97428 32101 5823 6863 21260 1348

21 comments:

  1. Very useful information shared in this article, nicely written! 바카라

    ReplyDelete
  2. You understand your projects stand out of the crowd. There is something unique about them. It seems to me all of them are brilliant.

    먹튀검증
    카지노사이트
    토토

    ReplyDelete
  3. Thanks for such a great post and the review, I am totally impressed! Keep stuff like this coming.

    메이저사이트
    바카라사이트
    토토사이트

    ReplyDelete
  4. Very detailed note and we appreciate your writing skill.
    슬롯머신사이트

    ReplyDelete
  5. I was more than happy to discover this great site. Continue to create more.
    바카라사이트

    ReplyDelete
  6. It’s impressive that you are getting thoughts from this piece of writing as well as from our discussion made at this time. 토토사이트


    ReplyDelete
  7. The blog was actually fantastic! Lots of abundant advice and inspiration, both of which we all need! 릴게임


    ReplyDelete
  8. Wonderful article. Fascinating to read. I love to read such an excellent article. Thanks! It has made my task more and extra easy. Keep rocking. 파워볼게임

    ReplyDelete
  9. Thank you for nice information. Please visit our web: click here

    ReplyDelete
  10. well written articles. It looks like you spend a lot of effort and time on your blog.
    토토
    토토사이트

    ReplyDelete
  11. I am searching like this type valuable information, it’s really helpful for me.
    카지노사이트
    바카라사이트

    ReplyDelete
  12. 돈을 만들고 돈이되는 커뮤니티 현금 같은 커뮤니티 - 목돈넷 https://mokdon.net
    언주 슬롯머신구비 광고 퀸알바 코인선물거래소 금융DB 오픈채팅 홀짝 충판모집 통장삽니다 가입머니 추출 MGM카지노그래프게임 테더 각종최신디비 인원채널 문자해킹디비 카쉐어링 바카라플레2배뱅커195넥스트링 주식아이투자 외국유심 배터 일반장 스포츠 승인전화 뒷빵 단가조율 미터치디비 선불유심팝니다 생성계정판매 승인요청 현금직거래손대손 사이트해킹 자동 바카라사이트 최대쿠폰 고액 출금한도 유심

    ReplyDelete
  13. I just came across your blog post that talks about time to switch to clang. for the first time, and I believe it is beneficial for our people. Please keep up the good work; I really enjoyed reading it and will give it some thought now. If you are a student and need assistance writing a narrative essay use the help writing scholarship essay. I highly recommend using this service because it is incredibly beneficial to students.

    ReplyDelete
  14. Discussion shall be needed with the device maker to ensure enough space is out there for the core to slip, and enough material in the device across the sliding core for reliability. Thread slicing screws for plastic can be found, nevertheless inserts provide longer half life Boxers the place disassembly or servicing is required. Ribs and supporting gussets are often necessary to give sufficient power, whilst maintaining the amount of fabric down.

    ReplyDelete
  15. There are several organizations that would provide learning programmers, but I'm discovering the greatest site literature essay writing service. I have utilized this service, so I am very familiar with it. For the best outcomes, you should give this organization a shot. I have no real concerns about your capacity to thoroughly investigate this supplier and choose wisely.

    ReplyDelete
  16. ratatouille musical is a music video based on one of the animated films produced by Disney. and tells the story of a mouse with an extraordinary talent for cooking

    ReplyDelete
  17. For instance, General Double Sided Tape Electric uses high-end 3D printers to construct components for generators. Many of these systems are used for rapid prototyping, before mass production strategies are employed. Higher education has confirmed to be a serious buyer of desktop and skilled 3D printers which trade consultants usually view as a optimistic indicator. Libraries around the world have also turn out to be locations to house smaller 3D printers for instructional and community access.

    ReplyDelete