← All stories
● Covered by 1 source · 1 reportMedium impact1 neutral

earstrip Library Released for Faster Polygon Triangulation, Outperforming earcut

🔄 Updated 16d ago
New to BrevFeed? We gather this story from every outlet covering it into one summary — ranked by real-world impact, not just the latest headline — so you never miss what matters. What is BrevFeed? →

Key points

  • earstrip library released under ISC license.
  • 14% faster than earcut.hpp in C++.
  • 1.4 to 2.1 times faster than earcut.js in browsers.
  • Triangulates 3.7 million polygons in 489 ms.
  • Improves map rendering performance.

earstrip Library Introduction

The polygon triangulator from a map engine has been released as a new library called earstrip. It is available as a single C++ header file and a WebAssembly build on npm. The library is licensed under the ISC license, matching the license used by earcut.

Performance Benchmarks

In C++, earstrip is 14% faster than earcut.hpp. For browser-based applications, earstrip.js demonstrates a performance increase of 1.4 to 2.1 times compared to earcut.js. The library was able to triangulate 3,740,425 polygons from a map of the Masovian Voivodeship in 489 milliseconds on one core of an M4 Pro.

Context: Polygon Triangulation in Mapping

GPUs process triangles exclusively, while maps consist primarily of polygons representing features like buildings, parks, and roads. Before these polygons can be rendered, they must be converted into triangles through a process called triangulation. For example, 331 polygons with 5,151 vertices can become 4,514 triangles.

Development Process

The earstrip library was developed by replacing a constrained Delaunay triangulator with an ear clipping algorithm. The development involved an iterative process where each idea was implemented and timed on the same dataset of 3.7 million polygons to measure performance improvements.

✨ This summary was generated by AI from the outlets' reporting listed below. It is not independently verified and may contain errors — check the original sources. How BrevFeed works →

The daily brief

One email each morning: the day's tech stories, clustered across outlets and summarized. No account needed.

One email a day. Unsubscribe in one click, any time.

Today's brief

Spend a few minutes, get the whole day. Every topic's top stories in one hands-free rundown — listen, watch, or read the transcript.

~4 min · 3 stories · Nov 07

▶ Play today's brief Listen on Spotify

New every morning, and the back catalogue is archived by date.

Reporting from

A new C++ and WebAssembly library, earstrip, has been released under the ISC license for polygon triangulation. It is 14% faster than earcut.hpp in C++ and 1.4 to 2.1 times faster than earcut.js in browsers, processing 3.7 million map polygons in 489 ms. This development provides a performance improvement for rendering map data, which relies on triangulating polygons for GPU processing.