Skip to content

TypeScript fannkuch-redux implementation skews results in paper #34

@akx

Description

@akx

This is tangentially related to #3.

The 2017 paper (linked today in an article in Finland's largest newspaper about the energy efficiency of IT) implies that TypeScript is about 16 times less energy-efficient with the fannkuch-redux benchmark.
It seems that this is down to the fact that the TypeScript implementation of the program itself is inefficient.

Running hyperfine against the transpiled JavaScript for the TypeScript program (which, naturally, is just JavaScript, so should exactly match the performance of JavaScript), shows this:

$ hyperfine "node TypeScript/fannkuch-redux/fannkuchredux.js 11" "node JavaScript/fannkuch-redux/fannkuchredux.node-4.js 11"
Benchmark 1: node TypeScript/fannkuch-redux/fannkuchredux.js 11
  Time (mean ± σ):      4.518 s ±  0.079 s    [User: 4.490 s, System: 0.016 s]
  Range (min … max):    4.409 s …  4.630 s    10 runs

Benchmark 2: node JavaScript/fannkuch-redux/fannkuchredux.node-4.js 11
  Time (mean ± σ):      2.516 s ±  0.031 s    [User: 2.497 s, System: 0.012 s]
  Range (min … max):    2.454 s …  2.559 s    10 runs

Summary
  'node JavaScript/fannkuch-redux/fannkuchredux.node-4.js 11' ran
    1.80 ± 0.04 times faster than 'node TypeScript/fannkuch-redux/fannkuchredux.js 11'

(I ran these with parameter 11 because I didn't have the patience to wait for Hyperfine to finish all trials at parameter 12 as used in the scripts in the repository, but it seems the performance gap between the programs grows more and more.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions