@vltpkg/fast-split 0.0.0-2 → 0.0.0-4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,17 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
# @vltpkg/fast-split
|
|
4
4
|
|
|
5
|
-
This is a very fast alternative to `String.split()`, which can be used
|
|
5
|
+
This is a very fast alternative to `String.split()`, which can be used
|
|
6
|
+
to quickly parse a small-to-medium sized string by a given delimiter.
|
|
6
7
|
|
|
7
|
-
**[It's fast](#how-fast-is-it)**
|
|
8
|
-
·
|
|
9
|
-
**[Usage](#usage)**
|
|
8
|
+
**[It's fast](#how-fast-is-it)** · **[Usage](#usage)**
|
|
10
9
|
|
|
11
10
|
## How Fast Is It!?
|
|
12
11
|
|
|
13
|
-
This is about 10% faster for splitting short strings by a short
|
|
12
|
+
This is about 10% faster for splitting short strings by a short
|
|
13
|
+
delimiter. When we have to walk the resulting list for any reason, or
|
|
14
|
+
limit the number of items returned, it's an even bigger difference.
|
|
14
15
|
|
|
15
|
-
2024 M1 macbook pro, using node 20.11.0, v8 version 11.3.244.8-node.17
|
|
16
|
+
2024 M1 macbook pro, using node 20.11.0, v8 version 11.3.244.8-node.17
|
|
17
|
+
Counts are operations per ms, splitting the string '1.2.3-asdf+foo' by
|
|
18
|
+
the delimiter '.', transforms calling part.toUpperCase(), and limits
|
|
19
|
+
at 2 items
|
|
16
20
|
|
|
17
21
|
```
|
|
18
22
|
split 10385.779
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vltpkg/fast-split",
|
|
3
3
|
"description": "A fast way to split small-to-medium sized strings by small string delimiters",
|
|
4
|
-
"version": "0.0.0-
|
|
4
|
+
"version": "0.0.0-4",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/vltpkg/vltpkg.git",
|