Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^3: Trading compile time for faster runtime?

by Tux (Canon)
on Apr 21, 2022 at 12:56 UTC ( [id://11143171]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Trading compile time for faster runtime?
in thread Trading compile time for faster runtime?

The speedup you might get for not supporting threads very much depends on your compiler, your OS, your OS thread support (Linux, Windos, VMS, z/OS, HP-UX, AIX, …) and the configuration of your perl. There is no single number that can be pinned to how much slower/faster perl will be (runtime) when built with/without a configuration option.

For the systems I run a smoke-test on, the gain for non-threaded perl is about

See https://tux.nl/perl5/smoke/index.html for smoke results, and a summary at the page bottom regarding performance differences:

threaded is 6.1% slower than non-threaded DEBUGGING is 2.5% slower than non-DEBUGGING gcc/g++ is 29.7% slower than cc (cc vs. gcc on non-Li +nux and gcc vs. g++ on Linux combined) stdio is 8.5% slower than perlio

Enjoy, Have FUN! H.Merijn

Replies are listed 'Best First'.
Re^4: Trading compile time for faster runtime?
by hv (Prior) on Apr 23, 2022 at 02:38 UTC

    It is worth keeping in mind that perl's test suite is not designed for benchmarking, and probably spends the majority of its time doing things very unrepresentative of any kind of normal workload. So while these timings may give a rough indication which build options are likely to be faster, any specific real workload will have its own unique set of timings which are unlikely to map closely to these figures.

    For one $work application a few years ago, we came up with a figure of about 25% speedup for a perl built without threads, for example. (That was probably around perl-5.18.) There's really no substitute for testing things on your own workload (which I think @Tux was saying, but not sure the message got through :).

Re^4: Trading compile time for faster runtime?
by swl (Parson) on Apr 22, 2022 at 03:31 UTC

    Are those times for the full build process or just running the tests?

    And do I read the table correctly in that the second of the repeated row labels is for g++ on linux and gcc on non-linux?

    A short extract is below showing two rows for the first two columns, representing "HP-UX - 11.11" and "HP-UX - 11.23". These are non-linux so am I correct that this means 106.3 for cc and 147.4 for gcc on those platforms? Although then I'm wondering what the values after the forward slash are.

    -Duse64bitall 106.3 / 97.2 59.6 / 66.3 -Duse64bitall 147.4 / 79.7 / 108.4

    Edit: But now I see the labels at the bottom of the table, so the repeated labels are for where -DDEBUGGING is set, and the forward slash separates the compilers. That answers the second part of my question.

      Running the tests


      Enjoy, Have FUN! H.Merijn

        Thanks for clarifying.

        One more question - what formula (or code) is used to calculate the speed difference? Most of the differences on Linux are about 5% or less (ratios). The big differences are all on HP-UX 11.23.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11143171]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (7)
As of 2024-04-19 06:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found