A bit old but still interesting

you are viewing a single comment's thread
view the rest of the comments
[–] 6 points 1 year ago (2 children)

Stop linking this, please! Any benchmark where Typescript and JavaScript are different is trash.

  • source
  • hideshow 2 child comments
  • [–] 3 points 1 year ago (1 child)

    Why? Typescript transpiles into js but maybe the transpiler intruduces some overhead, isn't it possible? I am not familiar with these languages, so this is an honest question.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 6 points 1 year ago

    It's barely transpiled. There are a couple of features that involve actual code generation - enums and namespaces (which are almost never used), but the vast majority of it is just stripping the type annotations so the performance will be 100% identical.

    It's like having "Python" and "Python with type hints" as separate languages and claiming there is a big speed difference between them.

  • source
  • parent