Skip to content

Commit b33b222

Browse files
authored
Remove an obsolete perf note
1 parent c6f19ea commit b33b222

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

docs/contributing.md

-9
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ Contribution guide for Mithril.js
1414
- [Why does Mithril.js use its own testing framework and not Mocha/Jasmine/Tape?](#why-does-mithriljs-use-its-own-testing-framework-and-not-mochajasminetape?)
1515
- [Why doesn't the Mithril.js codebase use ES6 via Babel or Bublé? Would a PR to upgrade be welcome?](#why-doesn't-the-mithril-codebase-use-es6-via-babel-or-bublé?-would-a-pr-to-upgrade-be-welcome?)
1616
- [Why doesn't the Mithril.js codebase use trailing semi-colons? Would a PR to add them be welcome?](#why-doesn't-the-mithriljs-codebase-use-trailing-semi-colons?-would-a-pr-to-add-them-be-welcome?)
17-
- [Why does the Mithril.js codebase use a mix of `instanceof` and `typeof` checks instead of `Object.prototype.toString.call`, `Array.isArray`, etc? Would a PR to refactor those checks be welcome?](#why-does-the-mithriljs-codebase-use-a-mix-of-instanceof-and-typeof-checks-instead-of-objectprototypetostringcall,-arrayisarray,-etc?-would-a-pr-to-refactor-those-checks-be-welcome?)
1817
- [What should I know in advance when attempting a performance related contribution?](#what-should-i-know-in-advance-when-attempting-a-performance-related-contribution?)
1918
- [Do you all accept donations?](#do-you-all-accept-donations?)
2019

@@ -108,14 +107,6 @@ I don't use them. Adding them means the semi-colon usage in the codebase will ev
108107

109108

110109

111-
## Why does the Mithril.js codebase use a mix of `instanceof` and `typeof` checks instead of `Object.prototype.toString.call`, `Array.isArray`, etc? Would a PR to refactor those checks be welcome?
112-
113-
Mithril.js avoids peeking at objects' [[class]] string for performance considerations. Many type checks are seemingly inconsistent, weird or convoluted because those specific constructs demonstrated the best performance profile in benchmarks compared to alternatives.
114-
115-
Type checks are generally already irreducible expressions and having micro-modules for type checking subroutines would add maintenance overhead.
116-
117-
118-
119110
## What should I know in advance when attempting a performance related contribution?
120111

121112
You should be trying to reduce the number of DOM operations or reduce algorithmic complexity in a hot spot. Anything else is likely a waste of time. Specifically, micro-optimizations like caching array lengths, caching object property values and inlining functions won't have any positive impact in modern JavaScript engines.

0 commit comments

Comments
 (0)