in reply to Re^4: Solaris + UltraSparc T2 + Threads: Avoid LCK's
in thread Solaris + UltraSparc T2 + Threads: Avoid LCK's

I made new tests and still not understand what the real reason.

Instead of rand I have used other expressions:

my $line = qq|Calling-Station-Id = "#crnh-b|; for( 1 .. 7e6 ) { expr N }

Expr 1 (LOCKs High)

my ($key, $value) = split(/ = /, $line);

Expr 2 (LOCKs High)

$line =~ /^([^=]+)\s=\s(.+)$/o;

Expr 3 (No LOCKs at all)

my $idx = index $line, " = ", 1; my $key = substr($line, 1,$idx); my $value = substr($line,$idx + 3);
What is wrong? my Perl, my SO? or I'm not thinking right?

Replies are listed 'Best First'.
Re^6: Solaris + UltraSparc T2 + Threads: Avoid LCK's
by BrowserUk (Patriarch) on Apr 24, 2009 at 12:15 UTC

    Sorry, but I don't think I can help you. In part, because you do not appear to be asking for help--just making (somewhat dubious) assertions.

    There doesn't seem to be any logic to your tests, nor any questions in your posts.

    Perl does, of necessity, use some internal locking when running threads. So what?


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.
      In my multithreaded program I need to remove all the REGEX, in order to improve the performance of my perl script!!!

      Whenever I use REGEX, my bottleneck its not the IO, but instead the REGEX's. And this, IMHO is bad.

      With this post I only want to know were was the botleneck of my script, and you are confirming to me that the Perl threads implementation have some problems.

      In my multithreaded program I need to remove all the REGEX, in order to improve the performance of my perl script!!!

      Whenever I use REGEX, my bottleneck its not the IO but instead the REGEX's. And this, IMHO is bad.

      With this post I only want to know were was the bottleneck of my script, and you are confirming to me that the Perl threads implementation have some problems.