Map [1]
Operation | Time Complexity |
---|---|
Access | O(log n) |
Search | O(log n) |
Insertion | O(n) for <= 32 elements, O(log n) for > 32 elements [2] |
Deletion | O(n) for <= 32 elements, O(log n) for > 32 elements |
# for an example of a suggested `locals_without_parens`, see z_locals_without_parens.exs | |
# parsing and expanding a formatter.exs file would be a good route too | |
opts = [sourceror_opts: [locals_without_parens: [...], line_length: 122]] | |
for transformation <- [&PipeChainStart.run/1, &SinglePipe.run/1] do | |
ProjTraversal.transform("../my_codebase/", transformation, opts) | |
end |
I am recently re-branding my libraries as µ (micro), refactoring these when necessary, dropping IE < 11 support, improving the logic where possible, or providing a better, more robust, or faster, API.
In few words, on the right there is the modern version of libraries I've used for the last ~5 years in production or for side projects, and I suggest anyone having one of the earlier dependencies, to have a look at their modern, micro, counterpart.
All sizes are minified, brotli compressed, and representing these two files, when possible:
const proxies = new WeakMap; | |
const hyphen = name => name.replace(/([a-z])([A-Z])/g, '$1-$2'); | |
const handler = { | |
get: (el, name) => el.getAttribute(hyphen(name)), | |
set: (el, name, value) => { | |
el.setAttribute(hyphen(name), value); | |
return true; | |
} | |
}; | |
const set = el => { |
A very simple comparison table between these two libraries.
uce | lit-element | |
---|---|---|
version | 1.11.9 | 2.4.0 |
license | ISC (simplified MIT) | BSD-3-Clause License |
language | JS w/ TS definition | TS w/ JS transpilation |
size ( brotli ) | 9437b ES5 / 6811b ES2015+ | 8634b ES5 / 6708b ES2015+ |
a gist to recap the current status, also available as library picker!
do one thing only and do it well
eXtreme Go Horse (XGH) Process | |
Source: http://gohorseprocess.wordpress.com | |
1. I think therefore it's not XGH. | |
In XGH you don't think, you do the first thing that comes to your mind. There's not a second option as the first one is faster. | |
2. There are 3 ways of solving a problem: the right way, the wrong way and the XGH way which is exactly like the wrong one but faster. | |
XGH is faster than any development process you know (see Axiom 14). |