[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Energy Benchmarks
- From: Frank Kastenholz <fkastenholz@...>
- Date: Tue, 2 Apr 2019 06:25:13 -0400
> On Apr 2, 2019, at 4:24 AM, Dirk Laurie <dirk.laurie@gmail.com> wrote:
>
> ... the rest of the code
> shows every sign of having been translated thoughtlessly from C.
>
> Frankly, that tells me more about the level of competence of the team
> who conducted the study than about the languages involved.
>
> -- Dirk
Indeed
Looking at the performance numbers (C is 1.0 vs lua at 83...) makes me agree.
Several years ago a project I was on took a C program and ported it to Lua. The initial port, by the writers of the C program, ended up with the Lua program running 50-100x as slow as the original C program. A few simple optimizations (using lots of locals and rewriting some loops that kept evaluating a constant) got us into the 5-10x range ... which was satisfactory for our needs.
My take from that project was that the “problem” was that the app developers were not really proficient in Lua AND had a narrow view of things (‘the compiler will optimize things so I don’t have to worry about it’) - leading to suboptimal performance.
The memory footprint of the program we were doing was not an issue. The data for the program, as well as the fixed size of the environment and libraries we developed, vastly outweighed the lua source and LVM bytecode size so any inefficiencies on Lua’s part were really irrelevant.
We did not look at power consumption
Frank Kastenholz