🌐
Reddit
reddit.com › r/typescript › typescript performance vs javascript
r/typescript on Reddit: Typescript performance vs JavaScript
February 1, 2024 -

I recently saw a comparison of how "green" or environmentally friendly programming languages are compared to one another with a ranked list. TypeScript compared pretty poorly and was significantly worse than JavaScript. The graphic I saw was based on a study and seemed to be implying that more green meant better performance. Correct me if I am misinterpreting.

My question is why would TypeScript perform differently than JavaScript? I am not familiar with build processes due to not working with TypeScript but I would assume TS would be transpiled to JS at build time and run as vanilla JS at run time. Is this incorrect? Including a link to a post about the study below for reference in case someone can provide perspective on that.

https://www.linkedin.com/posts/bytebytego_systemdesign-coding-interviewtips-activity-7156542626446344192-nmBJ?utm_source=share&utm_medium=member_desktop

Top answer
1 of 5
56
Yes it compiles to vanilla JS. This chart is basically click bait as it's been reposted constantly but there's really no way to account for all the factors that would influence a language's net power consumption. The only reasonable justification for a difference would be the additional compute required to type check when building, but the idea that would result in a 500% total increase compared to JS is nonsense.
2 of 5
11
This study comes up every so often, but it's really not great. You can see the actual paper here (PDF warning), but please take it all with a grain of salt. If you read through that, you can see that they found a particular benchmark suite online (the "benchmarks game", which is mostly defunct at this point), and assumed that these could be used as representative samples of code in each of the different languages. They then analysed the programs via a bunch of different metrics, and explored the results. The problem is that one program written probably by one or two people to solve a very specific task makes for a very poor sample. The Typescript/Javascript divide demonstrates this very clearly. As you say, Typescript is transpiled to Javascript in a very simple way — the compiler just removes all type hints, and the result is valid Javascript. (There are a couple of exceptions to this, but these shouldn't be relevant for this topic.) Moreover, Typescript is specifically designed so that idiomatic Typescript — i.e. the style of programming that is best supported by the language — should look pretty close to idiomatic Javascript. This implies that we can generally expect Javascript and Typescript performance profiles to be very similar, as Javascript and Typescript are nearly equivalent languages. Therefore, if we see very large discrepancies between code samples from these two different languages, this should raise some very large warning flags about our data sources. In this case, I suspect the difference largely comes from people simply using two different styles of programming. Heavy uses of abstraction can reduce performance, and aggressive use of various optimisations can increase performance. It may well be that the person who wrote the Javascript samples preferred a style of programming that produced faster software, whereas the Typescript developer preferred more abstract solutions. The result is that it's very difficult to trust much of the paper's conclusions. The fact that the authors did not apply this sanity check to their own work (they treat Typescript largely as an independent language to Javascript, and do not really explore why it would be so different to Javascript in many benchmarks) suggests that they do not have a huge amount of experience with many of the languages they were benchmarking. This means they would not have been able to properly assess whether the samples were idiomatic, heavily optimised, or something else entirely. (In fairness, it's difficult to expect people to be familiar with 27 different programming languages!)
🌐
JetBrains
blog.jetbrains.com › home › rustrover › rust vs javascript & typescript: performance, webassembly, and developer experience
Rust vs JavaScript & TypeScript: Performance and WebAssembly
February 17, 2026 - Rust and JavaScript/TypeScript aren’t competitors – they excel in different domains and are increasingly used together. JS/TS offers an unmatched ecosystem depth and rapid iteration, while Rust delivers performance, memory safety, and reliability.
Discussions

TypeScript Migrates to Go: What's Really Behind That 10x Performance Claim?
What's actually getting faster is the TypeScript compiler, not the TypeScript language itself or the JavaScript's runtime performance. Your TypeScript code will compile faster, but it won't suddenly execute 10x faster in the browser or Node.js. It's a bit like saying, "We made your car 10x faster!" and then clarifying that they only made the manufacturing process faster—the car itself still drives at the same speed. It's still valuable, especially if you've been waiting months for your car, but not quite what the headline suggests. Hadn't considered that people might misinterpret it this way, I suppose if you only read headlines that complaint is reasonable. The article itself was pretty clear what they were talking about. More on reddit.com
🌐 r/programming
118
307
March 24, 2025
Typescript performance vs JavaScript
Yes it compiles to vanilla JS. This chart is basically click bait as it's been reposted constantly but there's really no way to account for all the factors that would influence a language's net power consumption. The only reasonable justification for a difference would be the additional compute required to type check when building, but the idea that would result in a 500% total increase compared to JS is nonsense. More on reddit.com
🌐 r/typescript
41
0
February 1, 2024
What is TypeScript and why should I use it over JavaScript?
I would say that TS doesn't do things JS cannot do, from a functional PoV, since TS is "compiled" to JS, and often the result is very close of the initial code. Why would you want a better control over the data types? To take a trivial example, you can make a function taking a number to do a computation. In JS, you can call it with a string (a mistake easy to do), it will throw a runtime error and the program will stop. TypeScript would make an error at compile time, and even at the time you type the call, in a smart text editor like Visual Studio Code or similar. So you can avoid some runtime errors and gain some time. In a less trivial but similar and more realistic case, you can pass a complex object, TS will warn if you pass the wrong object (type). And you can build relatively complex types. Likewise, in classes, you can make private members. It was simulating them actually, but it was useful. Now JS has real private members. In short, TypeScript adds rules that limits you, which can be a good thing to avoid trivial and subtle programming errors, and it can be expressive, leading to quite self-documenting code, and it helps smart editors for auto-completion and inline documentation. There is so much more to say, but this post is already quite long… More on reddit.com
🌐 r/learnprogramming
55
79
April 21, 2026
JavaScript or TypeScript
You'll thank yourself in the long term, if you use typescript for your current projects More on reddit.com
🌐 r/reactnative
34
4
February 25, 2024
🌐
DEV Community
dev.to › dharamgfx › is-typescript-slower-than-javascript-the-performance-showdown-f3h
🏃‍♂️ Is TypeScript Slower than JavaScript? The Performance Showdown! 🕒 - DEV Community
August 29, 2024 - TypeScript’s value lies more in its ability to create robust, maintainable code rather than in directly influencing performance. So, while JavaScript performance is a piece of the puzzle, it’s not usually the primary culprit behind slow and unresponsive websites.
🌐
Programming Language Benchmarks
programming-language-benchmarks.vercel.app › typescript-vs-javascript
Typescript VS Javascript benchmarks, Which programming language or compiler is faster
Javascript · Kotlin · Lua · Nim · OCaml · Odin · Perl · Php · Python · Ruby · Rust · Swift · Typescript · V · Wasm · Zig · Current benchmark data was generated on Fri Aug 01 2025, full log can be found HERE · CONTRIBUTIONS are WELCOME! CPU INFO:[x86_64][4 cores] AMD EPYC 7763 64-Core Processor (Model 1) * -m in a file name stands for multi-threading or multi-processing ·
🌐
Bluebird International
bluebirdinternational.com › home › javascript vs typescript performance
JavaScript vs TypeScript Performance
June 6, 2024 - Embracing TypeScript's features enhances the maintainability, scalability, and overall quality of your project's codebase. These benefits can indirectly influence performance improvements, making TypeScript an ideal choice for modern web development. Improving JavaScript performance can be crucial for optimizing the execution time of your codebase.
🌐
Strapi
strapi.io › blog › typescript-vs-javascript
Typescript vs Javascript: Differences, Use Cases & More...
March 24, 2025 - When evaluating TypeScript versus JavaScript from a performance perspective, understand that TypeScript transpiles to JavaScript, so runtime performance is generally equivalent.
🌐
Medium
medium.com › @fhrvri.mmxiv › those-wondering-about-javascript-vs-typescript-performance-fd4dc1b76d05
Those wondering about JavaScript vs. TypeScript Performance | by Zoltan Fehervari | Medium
June 18, 2024 - Improving Algorithms: Use efficient data structures, implement memoization, and optimize loops and conditionals. TypeScript can provide a performance boost by enabling better code organization, type checking, and compiler optimizations.
Find elsewhere
🌐
Boot.dev
boot.dev › blog › javascript › javascript-vs-typescript
JavaScript vs TypeScript: What's the Difference? | Boot.dev
September 6, 2021 - It doesn’t specifically boost performance, but it makes debugging easier and its static typing makes compiling faster. Overall, comparing TypeScript’s and JavaScript’s performance is a bit of a misnomer since they’ll always perform the same.
🌐
ResearchGate
researchgate.net › publication › 389688794_Performance_Benchmarking_TypeScript_vs_JavaScript_in_Modern_Web_Development
(PDF) Performance Benchmarking: TypeScript vs. JavaScript in Modern Web Development
March 9, 2020 - This paper benchmarks the performance of TypeScript against JavaScript across different use cases, including execution speed, memory consumption, and development productivity. The study analyzes how TypeScript's benefits in error handling and maintainability influence overall performance in large-scale applications.
🌐
Medium
medium.com › @may_sanders › typescript-vs-javascript-with-use-cases-2025-guide-3aa20fc25d6f
TypeScript vs JavaScript with Use Cases (2025 Guide) | by May Sanders | Medium
June 12, 2025 - TypeScript’s static analysis allows compile-time error checking, preventing common runtime issues. IDEs like VS Code enhance this with real-time code suggestions, refactoring support, and intelligent error highlighting. In contrast, JavaScript relies on runtime debugging, which can slow down the development process and lead to costly mistakes if not properly tested.
🌐
Medium
medium.com › @mehdibafdil › typescript-vs-javascript-in-2025-the-ultimate-battle-ad8357d4d62c
TypeScript vs JavaScript in 2025: The Ultimate Battle | by Mehdi BAFDIL | Medium
December 17, 2024 - The software development landscape has evolved dramatically, and the TypeScript vs JavaScript debate has reached new heights in 2025. Let’s…
🌐
Reddit
reddit.com › r/programming › typescript migrates to go: what's really behind that 10x performance claim?
r/programming on Reddit: TypeScript Migrates to Go: What's Really Behind That 10x Performance Claim?
March 24, 2025 - JavaScript is slow!!! You could get that from the announcement with a 10x performance increase after migrating the TypeScript compiler to Go. The real story? Node.js works well at I/O but struggles with CPU-intensive tasks like compilation.
🌐
JayDevs
jaydevs.com › javascript-vs-typescript
Javascript VS. Typescript: Which Is Better for Your Project In 2023? - JayDevs
March 21, 2023 - Winner: When it comes to TypeScript vs. JavaScript performance, TypeScript executes faster.
🌐
Quora
quora.com › Is-TypeScript-slower-than-JavaScript
Is TypeScript slower than JavaScript? - Quora
Answer (1 of 24): They below comments are my own opinions based off of the knowledge and experience that I have. I did not do any research to answer this question. Although “slower” can mean many different things, I’m assuming that you are referring to run time performance.
🌐
Architecture Weekly
architecture-weekly.com › architecture weekly › typescript migrates to go: what's really behind that 10x performance claim?
TypeScript Migrates to Go: What's Really Behind That 10x Performance Claim?
March 24, 2025 - For TypeScript specifically, as the language grew more complex and powerful over the years, the compiler had to handle increasingly sophisticated type checking, inference, and code generation. This progression naturally pushed against the limits of what's efficient in a JavaScript runtime. The performance gap between the JavaScript and Go implementations isn't just about raw language speed—it's fundamentally about threading models and how they match the problem domain.
🌐
StxNext
stxnext.com › home › blog › what is typescript? pros and cons of typescript vs. javascript
What Is TypeScript? Pros and Cons of TypeScript vs. JavaScript
March 17, 2025 - TypeScript boosts overall performance and profits by streamlining development processes. “Based on my experience, TypeScript offers particularly significant benefits in medium-sized and large projects.
🌐
Hacker News
news.ycombinator.com › item
TypeScript slows down a project. Nobody seems to ever point out what benefits it... | Hacker News
January 2, 2020 - My claim: TypeScript offers no benefit. Ever. That's 2 years of fulltime TS experience talking and 18 years of fulltime JavaScript experience, on top of a whole bunch of full stack (Java and .Net with C#) experience · I think the popularity of TS is going to decline.