A simplified but faster version of Routerify

Overview

Routerify lite

Routerify-lite is a simplified but faster version of Routerify.

It only provides below functions:

  • path matching
  • error handling

Why not Routerify?

Routerify is an excellent lib! But sometimes it performs not so well. So I rewrite some code paths to improve performance. If you need the full functions, you must use Routerify.

Why not warp?

Warp is fast. But due to its linear scan path matching, it would be as slow as the number of API combination increase. However, Routerify uses RegexSet, which could match the URI path towards the pattern list in one scan.

For example, I add 50 random URIs to match, then routerify-lite is better than warp.

Check the code here:

https://gist.github.com/kingluo/8ccd88b53e9d2878391dbb91ad1f4751

wrk -t2 -c100 -d60s http://test1:8080/hello/world

Performance2

Performance

wrk -t2 -c100 -d60s http://test1:8080

Performance

Check the code here:

https://gist.github.com/kingluo/73592448153fcc0e48788a5f9080b3bd

Difference between Routerify and Routerify-lite

  • Routerify uses * to matching anything, but Routerify-lite uses .*
  • Routerify adds default 404 error response, while Routerify-lite needs the user to add manually
You might also like...
A future version of Pokétwo

poketwo-next Pokétwo brings the Pokémon experience to Discord. Catch randomly-spawning pokémon in your servers, trade them to expand your collection,

Rc version `tokio-rs/bytes`

RcBytes The aim for this crate is to implement a Rc version bytes, which means that the structs in this crate does not implement the Sync and Send. Th

Original Version Management System based on Git
Original Version Management System based on Git

nss (noshishi) Original Version Management System based on Git. Learning git and rust for good developer. Usage Install cargo install nssi how to nss

Github mirror of codeberg repo. Monitor live bandwidth usage/ network speed on PC. Native version also available for Android, separately.
Github mirror of codeberg repo. Monitor live bandwidth usage/ network speed on PC. Native version also available for Android, separately.

Netspeed Monitor Netspeed is a cross-platform desktop application that shows the live upload speed, download speed and day's usage as an overlay. Feat

A lending version of the `Stream` trait

lending-stream A lending version of Stream API Docs | Releases | Contributing Installation $ cargo add lending-stream Safety This crate uses #![deny(u

Like jq, but for HTML. Uses CSS selectors to extract bits content from HTML files.

Like jq, but for HTML. Uses CSS selectors to extract bits content from HTML files. Mozilla's MDN has a good reference for CSS selector syntax.

Catify, but built in rust
Catify, but built in rust

A simple project to prettify commit messages NOW IN RUST! Commit messages are good. They provide information about tons of things. But far too many co

The tool like Browserslist, but written in Rust.

browserslist-rs The tool like Browserslist, but written in Rust. Try it out Before trying this crate, you're required to get Rust installed. Then, clo

Fibonacci, but different

n-days Fibonacci, but different? Problem You're given a workout in the 12 Days of Christmas style: 1. Burpee Bar Muscle-Up 2. Thrusters 3. Power Clean

Owner
jinhua luo
jinhua luo
Reload Rust code without app restarts. For faster feedback cycles.

hot-lib-reloader hot-lib-reloader is a development tool that allows you to reload functions of a running Rust program. This allows to do "live program

Robert Krahn 274 Jan 1, 2023
A lightning fast version of tmux-fingers written in Rust, copy/pasting tmux like vimium/vimperator

tmux-thumbs A lightning fast version of tmux-fingers written in Rust for copy pasting with vimium/vimperator like hints. Usage Press ( prefix + Space

Ferran Basora 598 Jan 2, 2023
🦸‍♂️ Recast migrates your old extensions to AndroidX, making them compatible with the latest version of Kodular.

Recast Recast helps make your old extensions compatible with Kodular Creator version 1.5.0 or above. Prerequisites To use Recast, you need to have Jav

Shreyash Saitwal 13 Dec 28, 2022
Rust version of tomnomnom/waybackurls

wayback-rs Rust version of tomnomnom/waybackurls Command line interface for fetching url from Wayback Machine, CommonCrawl, VirusTotal.

null 3 Oct 22, 2021
Incremental, multi-version remote backup tool for block devices.

bsync Incremental, multi-version remote backup tool for block devices. The on-disk backup format is a SQLite database and I've been dogfooding this on

Heyang Zhou 7 Aug 21, 2022
Convert Hygea calendar to an iCal file to easily import it to Google Calendar (Rust version)

Hygea to iCal Goal Hygea provides a calendar via PDF and an application called Recycle. I just wanted to use an iCal file to import it in my calendar.

Guillaume Quittet 2 Oct 28, 2021
Wrapped ICP (WICP) - A composable and interoperable wrapped version of ICP.

Wrapped ICP - WICP Wrapped ICP (WICP) is a wrapped version of the IC's native token, ICP. Each WICP will be backed 1:1 with ICP, meaning that 1 WICP w

Psychedelic 16 Sep 23, 2022
A rust-based version of the popular dnsgen python utility

ripgen A rust-based version of the popular dnsgen python utility. ripgen is split into two main parts: ripgen: A CLI utility that calls into ripgen_li

resync 198 Jan 2, 2023
Verbump - A simple utility written in rust to bump and manage git semantic version tags.

Verbump - A simple utility written in rust to bump and manage git semantic version tags.

Sarat Chandra 6 May 6, 2022
Ferris has to escape the creepers using a modified version of Dijkstra called A*

Ferris has to escape the creepers using a modified version of Dijkstra called A*

Security Union 13 Oct 30, 2022