This repository has been archived by the owner on Apr 22, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
url: Go much faster by using Url class
V8 loves it when JavaScript pretends to be a Classic inheritance type of language. Before: $ ./node benchmark/url.js benchmarking parse() ... 1.868 sec benchmarking format() ... 1.906 sec benchmarking resolve("../foo/bar?baz=boom") ... 7.800 sec benchmarking resolve("foo/bar") ... 7.099 sec benchmarking resolve("http://nodejs.org") ... 8.403 sec benchmarking resolve("./foo/bar?baz") ... 7.974 sec After: $ ./node benchmark/url.js benchmarking parse() ... 1.769 sec benchmarking format() ... 1.793 sec benchmarking resolve("../foo/bar?baz=boom") ... 4.254 sec benchmarking resolve("foo/bar") ... 3.932 sec benchmarking resolve("http://nodejs.org") ... 4.382 sec benchmarking resolve("./foo/bar?baz") ... 4.293 sec
- Loading branch information