AlgorithmVisualizer
binary_search
| AlgorithmVisualizer | binary_search | |
|---|---|---|
| 1 | 4 | |
| 438 | 682 | |
| 28.1% | 0.3% | |
| 4.2 | 4.2 | |
| 3 days ago | 12 months ago | |
| JavaScript | C | |
| MIT License | The Unlicense |
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.
AlgorithmVisualizer
-
My first react project
You can visit my web app or the github repo here
binary_search
-
Migrating Away from Rust
Nice catch. I had goofed by omitting optimization when checking this.
That said, this brings me to my original reason for checking this, which is to say that it did not use a cmov instruction to eliminate unnecessary branching from the loop, so it is probably slower than a binary search that does:
https://en.algorithmica.org/hpc/data-structures/binary-searc...
That had been the entire motivation behind this commit to OpenZFS:
https://github.com/openzfs/zfs/commit/677c6f8457943fe5b56d7a...
It should be possible to adapt this to benchmark both the inlined bsearch() against an implementation designed to encourage the compiler to emit a conditional move to skip a branch to see which is faster:
https://github.com/scandum/binary_search
My guess is the cmov version will win.
-
Fastest Branchless Binary Search
Related repository of interest: https://github.com/scandum/binary_search
"The most notable variant, the monobound binary search, executes two to four times faster than the standard binary search on arrays smaller than 1 million 32 bit integers."
-
c code of a bsearch() alternative, up to 60% faster
https://github.com/scandum/binary_search#monobound_bsearch-vs-bsearch
What are some alternatives?
sorting-visualizer - A Sorting Algorithms Visualizer built using ReactJS
eternal - A C++14 compile-time/constexpr map and hash map with minimal binary footprint
sort-visualizer - This repository for the web application sorting visualizer which is built using HTML, CSS, JS
leetcode-swift - TOP 200 #Dev 🏆 LeetCode, Solutions in Swift, Shell, Database (T-SQL, PL/SQL, MySQL), Concurrency (Python3). @ S. Leschev. Google Engineering Level: L6+
SortingAlgorithms - Sorting algorithms visualized.
Bplus.jl - A modern OpenGL 4.6 rendering framework, written in Julia.