Skip to content
This repository has been archived by the owner on Dec 6, 2021. It is now read-only.

Perf boost: Swap chalk for turbocolor #466

Closed
wants to merge 910 commits into from
Closed

Perf boost: Swap chalk for turbocolor #466

wants to merge 910 commits into from

Conversation

jorgebucaran
Copy link

Hello @egoist! 👋

This PR swaps chalk for turbocolor.

It will give you a perf boost as turbocolor loads >20x faster and applies styles >18x faster than chalk for the same API (see benchmarks). Supports Node.js >=v4.

# Load Time
chalk: 15.190ms
turbocolor: 0.777ms

# All Colors
chalk × 8,729 ops/sec
turbocolor × 158,383 ops/sec

# Chained Colors
chalk × 1,838 ops/sec
turbocolor × 39,830 ops/sec

# Nested Colors
chalk × 4,049 ops/sec
turbocolor × 59,833 ops/sec

Let me know if this is acceptable to you. Cheers!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.