[Info-vax] Python for x86?

Arne Vajhøj arne at vajhoej.dk
Sun May 7 11:52:50 EDT 2023


On 5/4/2023 8:18 AM, Simon Clubley wrote:
> On 2023-05-03, Arne Vajhøj <arne at vajhoej.dk> wrote:
>> On 5/2/2023 1:27 PM, Simon Clubley wrote:
>>
>>> std::string would be interesting here if you have access to a C++ compiler.
>>
>> C++ on Alpha simulator gives 0.005.
>>
> 
> Thanks. It's interesting seeing how various languages compare.

Just realized that I had an error in the calculation for
string performance in Fortran and Basic (I fucked up with the
VMS_FACTOR constant that is used to keep string length under
32K).

So again with C++ and (hopefully) with Fortran and Basic
correct for string operations:

Integer operations
                                 Alpha sim         Itanium
                                 (no JIT)          (older)
C, C++, Pascal, Fortran         24-29             246
Basic                           5                 38
Ada (gnat make)                 8                 -
Ada (gnat make -gnatp "-O3")    44                -
Java 5                          11                -
Java 8                          -                 286
Python 2                        0.05              -
Python 3                        -                 0.6

String operations
                                 Alpha sim         Itanium
                                 (no JIT)          (older)
C                               0.078             1.94
C++                             0.049             0.40
Pascal                          0.005             0.32
Fortran                         0.156             6.94
Basic                           0.004             0.13
Ada (gnat make)                 0.005             -
Ada (gnat make -gnatp "-O3")    0.005             -
Java 5                          0.033             -
Java 8                          -                 1.76
Python 2                        0.005             -
Python 3                        -                 0.065

Again the string numbers are not so much a reflection on
compiler efficiency but more a reflection on how string
operations are done "natural" in the language - static
vs dynamic etc..

If someone want to check themselves the sources are
available at https://www.vajhoej.dk/arne/temp/bm.zip !

Arne





More information about the Info-vax mailing list