Skip to content

Commit

Permalink
adding more faces
Browse files Browse the repository at this point in the history
  • Loading branch information
carvilsi committed Mar 12, 2024
1 parent 773414d commit 6eea825
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
10 changes: 5 additions & 5 deletions benchmark/report.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
┌─────────┬──────────────────────────────────┬─────────────┬────────────────────┬──────────┬─────────┐
│ (index) │ Task Name │ ops/sec │ Average Time (ns) │ Margin │ Samples │
├─────────┼──────────────────────────────────┼─────────────┼────────────────────┼──────────┼─────────┤
│ 0 │ 'random face' │ '2,484,733' │ 402.45765545824605 │ '±3.58%' │ 248474
│ 1 │ 'print all the faces' │ '7,198' │ 138911.05693247583 │ '±2.30%' │ 720
│ 2 │ 'get one by name; more than one' │ '12,428' │ 80458.93167883565 │ '±1.91%' │ 1243
│ 3 │ 'get one by name; just one' │ '13,773' │ 72601.97746001066 │ '±1.20%' │ 1378
│ 4 │ 'get array of faces by name' │ '12,465' │ 80224.14108420144 │ '±1.89%' │ 1247
│ 0 │ 'random face' │ '2,856,094' │ 350.1285012435906 │ '±4.26%' │ 285610
│ 1 │ 'print all the faces' │ '8,072' │ 123873.74487917611 │ '±0.33%' │ 808
│ 2 │ 'get one by name; more than one' │ '14,074' │ 71048.20182377641 │ '±0.77%' │ 1408
│ 3 │ 'get one by name; just one' │ '13,608' │ 73481.83329538068 │ '±1.32%' │ 1361
│ 4 │ 'get array of faces by name' │ '10,948' │ 91336.41477589194 │ '±2.29%' │ 1095
└─────────┴──────────────────────────────────┴─────────────┴────────────────────┴──────────┴─────────┘
7 changes: 6 additions & 1 deletion src/faces.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,12 @@ const canonical = {
joyful: [
'^_^', '(°o°)', '(^_^)', '/(^O^)/', '(^o^)/', '(^^)/', '(≧∇≦)/',
'(/◕ヮ◕)/', '(^o^)丿', '∩(·ω·)∩', '(·ω·)', '^ω^'
]
],
kowtow_respect_dogeza_apology: [
'(__)', '_(._.)_', '_(_^_)_', '<(_ _)>', '<m(__)m>', 'm(__)m', 'm(_ _)m'
],
middle_fingers: [ '(凸ಠ益ಠ)凸' ],
questioning: [ '\(°ロ\)', '(/ロ°)/' ]
}
};

Expand Down
2 changes: 1 addition & 1 deletion tests/main.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ test('should retrieve an array of faces and a random face', (t) => {
const arrayOfFaces = facetxt.all;

t.true(arrayOfFaces.length > 0, 'the array of faces is empty');
t.is(arrayOfFaces.length, 277);
t.is(arrayOfFaces.length, 287);

const face = facetxt.rand;

Expand Down

0 comments on commit 6eea825

Please sign in to comment.