CommunityNews
TypeScript as fast as Rust: TypeScript++
TL;DR: This is a proposal to create a language that sits somewhere between Typescript and Rust, and which you can incrementally adopt if you already use Typescript.
Typescript and Rust can feel pretty similar:
// Typescript type Vec2 = { x: number, y: number }; function avgLen(vecs: Vec2[]): number { let total = 0; for (const vec of vecs) { total += Math.sqrt(vec.x*vec.x + vec.y*vec.y); } return total / vecs.length; }// Rust struct Vec2 { x: f64, y: f64 } fn avg_len(vecs: &[Vec2]) -> f64 { let mut total = 0.0; for vec in vecs { total += (vec.x*vec.x + vec.y*vec.y).sqrt(); } return total / vecs.len() as f64; }In some ways, Rust feels like a more restrictive but faster version of Typescript. But Typescript/Javascript can be very fast too; owing to years of hard work by browser vendors. In this article we’ll look at the performance characteristics of each in more detail, and see if we can have the best of both worlds.
Read in full here:
https://zaplib.com/docs/blog_ts++.html
This thread was posted by one of our members via one of our news source trackers.
Popular Backend topics
New
nim-lang/Nim.
Nim is a statically typed compiled systems programming language. It combines successful concepts from mature languages lik...
New
This blog post walks you through how to implement a time-series database engine based on what I’ve learned from my experience of writing ...
New
Algebraic effects and handlers provide a modular abstraction for expressing effectful computation, allowing the programmer to separate th...
New
GitHub - cshum/imagor: Fast, Docker-ready image processing server written in Go and libvips, with Thumbor URL syntax.
Fast, Docker-ready...
New
Ruby: How to Run a Rack app in a Background Thread.
Stubbing and mocking are fine, but sometimes you want to test full integration. This...
New
Letting Go of Random.
In a recent post I shared some thoughts about art and included a few, somewhat tongue-in-cheek comments about the ...
New
C++ Cheat Sheets & Infographics.
Graphics and cheat sheets, each capturing one aspect of C++: algorithms/containers/STL, language ba...
New
GitHub - mcobzarenco/zee: A modern text editor for the terminal written in Rust.
A modern text editor for the terminal written in Rust -...
New
Perfecting WebGPU/Dawn native graphics for Zig.
A 700+ commit complete rewrite of mach/gpu (the WebGPU interface for Zig) has been compl...
New
Other popular topics
No chair. I have a standing desk.
This post was split into a dedicated thread from our thread about chairs :slight_smile:
New
New
poll
poll
Be sure to check out @Dusty’s article posted here: An Introduction to Alternative Keyboard Layouts It’s one of the best write-...
New
New
In case anyone else is wondering why Ruby 3 doesn’t show when you do asdf list-all ruby :man_facepalming: do this first:
asdf plugin-upd...
New
Programming Ruby is the most complete book on Ruby, covering both the language itself and the standard library as well as commonly used t...
New
Author Spotlight:
Peter Ullrich
@PJUllrich
Data is at the core of every business, but it is useless if nobody can access and analyze ...
New
Get the comprehensive, insider information you need for Rails 8 with the new edition of this award-winning classic.
Sam Ruby @rubys
...
New
Curious what kind of results others are getting, I think actually prefer the 7B model to the 32B model, not only is it faster but the qua...
New
Background
Lately I am in a quest to find a good quality TTS ai generation tool to run locally in order to create audio for some videos I...
New
Categories:
Sub Categories:
Popular Portals
- /elixir
- /rust
- /ruby
- /wasm
- /erlang
- /phoenix
- /keyboards
- /python
- /js
- /rails
- /security
- /go
- /swift
- /vim
- /clojure
- /emacs
- /java
- /haskell
- /svelte
- /onivim
- /typescript
- /kotlin
- /c-plus-plus
- /crystal
- /tailwind
- /react
- /gleam
- /ocaml
- /flutter
- /elm
- /vscode
- /ash
- /html
- /opensuse
- /centos
- /zig
- /deepseek
- /php
- /scala
- /react-native
- /textmate
- /sublime-text
- /lisp
- /debian
- /nixos
- /agda
- /django
- /kubuntu
- /arch-linux
- /deno
- /revery
- /nodejs
- /ubuntu
- /spring
- /manjaro
- /diversity
- /lua
- /julia
- /markdown
- /c








