https://github.com/tyhopp/markdown-to-html
API with Rust and Node implementations
https://github.com/tyhopp/markdown-to-html
Last synced: about 1 year ago
JSON representation
API with Rust and Node implementations
- Host: GitHub
- URL: https://github.com/tyhopp/markdown-to-html
- Owner: tyhopp
- License: mit
- Created: 2021-11-24T10:05:40.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-01-15T03:52:41.000Z (over 4 years ago)
- Last Synced: 2025-02-17T16:52:29.756Z (over 1 year ago)
- Language: TypeScript
- Homepage:
- Size: 66.4 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# markdown-to-html
API that transforms markdown into HTML. It has implementations in [Rust](./rust/README.md) and [Node](./node/README.md).
The goal is to compare the performance of a typical endpoint in each language. The benchmark should be read as a ballpark figure rather than a rigorous test.
Key results:
- **Node** implementation can handle roughly **0.9k to 1k requests per second**
- **Rust** implementation can handle roughly **13k to 14k requests per second**
Things to consider:
- The underlying libraries used are entirely different
- Only one benchmarking tool was used on a single local machine
- I am more familiar with Node than Rust
## Usage
See respective [Rust](./rust/README.md) and [Node](./node/README.md) READMEs for usage.
## Benchmark
Benchmarking is done with [ApacheBench](https://httpd.apache.org/docs/2.4/programs/ab.html), which is built into macOS and [can be installed on Windows systems](https://httpd.apache.org/docs/2.4/platform/win_compiling.html).
To execute the benchmark, see instructions in the [Rust](./rust/README.md) and [Node](./node/README.md) READMEs. Generally you will:
- Make sure one of the servers (Node or Rust) is running at `http://localhost:3000`
- In the benchmark directory, run `bash benchmark.sh`