flatbush VS rbush

Compare flatbush vs rbush and see what are their differences.

flatbush

A very fast static spatial index for 2D points and rectangles in JavaScript 🌱 (by mourner)

rbush

RBush — a high-performance JavaScript R-tree-based 2D spatial index for points and rectangles (by mourner)
Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
flatbush rbush
5 2
1,374 2,359
- -
0.0 4.8
3 months ago 7 months ago
JavaScript JavaScript
ISC License MIT License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

flatbush

Posts with mentions or reviews of flatbush. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-10-06.
  • Databases are the endgame for data-oriented design
    1 project | news.ycombinator.com | 6 Dec 2023
    > (There are ECS frameworks in JavaScript, which gives you absolutely no control over memory layout and thus completely defeats one of the primary purposes of the pattern.)

    While JS does not provide great support for bit packing complex structs, typed arrays give you quite a bit of control over memory layout for simple numeric types, which is what you usually want for optimal data-oriented code anyway. This is a common technique used in fast JS libs for data visualization, ie:

    https://github.com/mourner/flatbush

    There are also basic operators required for bitarrays, which are useful for ECS and memory-efficient code generally.

  • React Virtualisation from scratch
    5 projects | dev.to | 6 Oct 2023
    using flatbush library instead of rbush which optimise the statically placed element, from the benchmark in the repository it could boost up to 5x the performance of rbush.
  • Load GeoHash data in RAM for querying for Proximity Searches
    1 project | /r/geospatial | 28 May 2023
    But for 500 k points, it's not many. I'd put it in the database tech I was using and hit an API for it. Or like you say, load it into memory and use Mourner's flatbush for a super simple and super fast solution..
  • Flatbush: A fast static spatial index for 2D points and rectangles in JavaScript
    1 project | news.ycombinator.com | 11 Apr 2023
  • Protobuf-ES: The Protocol Buffers TypeScript/JavaScript runtime we all deserve
    14 projects | news.ycombinator.com | 31 Oct 2022
    > At pbf speeds, decoding is usually no longer a bottleneck, but bandwidth might be when comparing with gzipped JSON.

    we were streaming a few hundred datapoints in a dozen flat arrays over websocket at 20-40hz and needed to decode the payload eagerly. plain JSON was a multi-factor speedup over pbf for this case. but it's fully possible i was holding it wrong, too!

    even if your "bottleneck" is rendering/rasterization (10ms), but your data pipe takes 5ms instead of 1ms, it's a real effect on framerate, battery, thermals, etc.

    i'm a big fan of your work! while i have you here, would you mind reviewing this sometime soon? ;)

    https://github.com/mourner/flatbush/pull/44

rbush

Posts with mentions or reviews of rbush. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-10-06.
  • React Virtualisation from scratch
    5 projects | dev.to | 6 Oct 2023
    There's a great library call rbush written by mourner which suits our purpose perfectly! Please do give a star to the repository if you like!
  • Islamic Geometric Art (Design #30 from Anadolu Selçuklu Sanatinin Geometrik Dili)
    5 projects | /r/PlotterArt | 9 Nov 2022
    There's been 2 downsides with this approach, though. First is that I haven't found any good Javascript libraries for geometry—there are bits and pieces, but nothing good for questions like "what are the intersection points of these 2 circles". So I've been slowly cobbling together my own, and it's working okay. I'm still hoping that there's one out there, and I either haven't found it, or haven't realized it meets my needs. On the plus side, there are a *lot* of JS libraries for different data structures that are helpful—for instance, I used rbush to really speed up finding line intersections on the full graph of what I plotted. I'll use that to find polygons, and the long lines that snake across the whole image.

What are some alternatives?

When comparing flatbush and rbush you can also consider the following projects:

virtualised-whiteboard

liwords - A site that allows people to play a crossword board game against each other

supercluster - A very fast geospatial point clustering library for browsers and Node.

protoc-gen-validate - Protocol Buffer Validation - Being replaced by github.com/bufbuild/protovalidate

robust-predicates - Fast robust predicates for computational geometry in JavaScript

react-virtualized - React components for efficiently rendering large lists and tabular data

earcut - The fastest and smallest JavaScript polygon triangulation library for your WebGL apps

ts-proto - An idiomatic protobuf generator for TypeScript

saxi - Tools & library for driving the AxiDraw pen plotter

pbf - A low-level, lightweight protocol buffers implementation in JavaScript.

canvas-sketch - [beta] A framework for making generative artwork in JavaScript and the browser.