4 Replies Latest reply on Jun 16, 2009 9:59 PM by edward_yang

    Performance hit with pthread?


      I was working on a interger program which basically walks a bush (multiple tree) topology and performs SIMD on each node along the way. When not using pthread, opencc results in 5%-10% better performance than gcc 4.2. However, when using pthread, even if only one thread is forked/used, opencc has 40% *lower* performance than gcc 4.2.

      Is there some known issues that could be the reason for this? If not, how should I proceed to find out the problem?

      Also does opencc accept the data type attribute for memory alignment?



        • Performance hit with pthread?

          I'm not sure what might be causing the performance difference? Can you provide the source code for us to investigate?

          You can also use CodeAnalyst to profile your GCC and Open64 codes?


          I will get back to you about the support for data type attribute for alignment.


            • Performance hit with pthread?

              Thanks for the reply! The source code is rather involved, so I'll have to clean it up before sending it to you (will have to do it later since we're catching a deadline here). I also need to look through th cvs record to see what else might've been changed when I added threading.

              Open64 seems to take whatever attribute on memory alignment without objection. I just don't know whether the compiler & linker effectively align as much as 64 bytes (cache line size). Thanks again.