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

Added felt-pen & More accurate benchmarking #21

Merged
merged 4 commits into from Sep 26, 2021
Merged

Added felt-pen & More accurate benchmarking #21

merged 4 commits into from Sep 26, 2021

Conversation

nin-jin
Copy link

@nin-jin nin-jin commented Sep 26, 2021

node .\complex-benchmark.js
chalk          1,201,276 ops/sec
cli-color        135,233 ops/sec
ansi-colors      719,065 ops/sec
kleur          1,404,775 ops/sec
kleur/colors   1,471,413 ops/sec
colorette      1,603,018 ops/sec
felt-pen       1,489,272 ops/sec
nanocolors     1,674,054 ops/sec
chalk         101 kB
cli-color    1249 kB
ansi-colors    25 kB
kleur          21 kB
colorette      16 kB
felt-pen        6 kB
nanocolors     16 kB

@ai
Copy link
Owner

ai commented Sep 26, 2021

Cool lib!

  1. Can you also add your lib to ./test/loading.cjs and ./test/size.js benchmarks?
  2. Any reasons why ++index is better? Just to avoid regressions in the future.

@StoneCypher
Copy link

This is a stolen library. Ai removed the git history and author, asked people to switch, and when caught, asked the real author to credit him.

Do not support this person.

Please donate to the real one instead.

@ai
Copy link
Owner

ai commented Sep 26, 2021

@StoneCypher I mentioned colorette and add colorette’s author to LICENSE before any Twitter thread just after colorette author asked me.

I am asking colorette author for credit because of 2x performance improvements, which he copied. It is OK to copy ideas, but you are right that origin author should be mentioned.

@@ -17,36 +18,42 @@ function formatNumber(number) {
}

let suite = new benchmark.Suite()
let out // eslint-disable-line no-unused-vars
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we remove it if it is not used?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to add out = to benchmarks?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

JIT can throw out content of pure functions if result isn't used. It's relevant for simple benchmark but not complex. I will remove it.

@nin-jin
Copy link
Author

nin-jin commented Sep 26, 2021

Any reasons why ++index is better?

It's prevent JIT from inline const string.

@ai
Copy link
Owner

ai commented Sep 26, 2021

It's prevent JIT from inline const string.

Wow! Cool idea!

@ai ai merged commit 174d64f into ai:main Sep 26, 2021
@StoneCypher
Copy link

@StoneCypher I mentioned colorette and add colorette’s author to LICENSE before any Twitter thread just after colorette author asked me.

I am asking colorette author for credit because of 2x performance improvements, which he copied. It is OK to copy ideas, but you are right that origin author should be mentioned.

It's extremely gross that after you were caught ripping off every line, without ever saying that you did anything wrong, you're pointing the finger at him over minor tuning of his own code.

You should have submitted a PR to his library.

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.

None yet

3 participants