gpujs/gpu.js

GPU Accelerated JavaScript

View on GitHub ↗Jump to charts ↓

Summary Information

Updated 48 minutes ago
Added to GitGenius on September 3rd, 2026
Created on February 9th, 2016
Open Issues & Pull Requests: 66 (+0)
GitHub issues: Enabled
Number of forks: 664
Total Stargazers: 15,442 (+0)
Total Subscribers: 236 (+0)

Repository Insights (GitGenius)

Most active contributors

Sign in to see contributor activity.

Related repositories by overlapping contributors

No overlapping-contributor repos identified yet.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Issue API getrepoissuespagesummary failed: 429 Rate limit exceeded. Please try again later.

Detailed Description

GPU.js is a JavaScript acceleration library that automatically transpiles JavaScript functions into GPU shader code and executes them on the graphics processor for general-purpose computing tasks.

The library solves the problem of running computationally intensive JavaScript code slowly on the CPU by converting simple JavaScript functions into shader language that runs in parallel on the GPU. When a GPU is unavailable, the same functions fall back to regular JavaScript execution. The transpilation happens automatically, so developers write ordinary JavaScript while the library handles the compilation to WebGL or WebGPU backends.

GPU.js suits projects that perform matrix operations, mathematical computations, or data-parallel tasks where the same operation repeats across many data elements. Typical use cases see performance improvements of one to fifteen times faster than CPU execution, depending on hardware. The library works in browsers via WebGL or WebGPU and in Node.js environments. Developers should be aware that version three will make all kernel calls return promises by default, which is a breaking change from the current synchronous API. The README indicates this shift is necessary to support WebGPU as a first-class backend and to avoid blocking the main thread during GPU readback operations. A synchronous escape hatch will remain available for WebGL backends during migration, though WebGPU cannot offer one.

The project maintains active development with ongoing architectural improvements. The codebase includes TypeScript support and examples demonstrating usage patterns. The maintainers have published educational resources including a free browser-based course on GPGPU concepts. The planned transition to async-by-default reflects deliberate design decisions about supporting modern GPU APIs and addressing performance bottlenecks in the current synchronous implementation.