<commit_before>'use strict';

const F = require("../lib/fastener")

const inc = x => typeof x === "number" ? x + 1 : x

const nested = [{x:1,y:[2,{d:3},4],z:{a:5}}]
const vs1000 = Array(1000).fill(1)

const bs = [
  'F.fromZipper(F.everywhere(inc, F.toZipper(nested)))',
  'F.fromZipper(F.everywhere(inc, F.toZipper(vs1000)))'
]

const s = new require("benchmark").Suite()
bs.forEach(b => s.add(b, eval("() => " + b)))
s.on('cycle', e => console.log(String(e.target))).run()<commit_msg>Can't handle 1000 with R<commit_after>'use strict';

const F = require("../lib/fastener")

const inc = x => typeof x === "number" ? x + 1 : x

const nested = [{x:1,y:[2,{d:3},4],z:{a:5}}]
const vs100 = Array(100).fill(1)

const bs = [
  'F.fromZipper(F.everywhere(inc, F.toZipper(nested)))',
  'F.fromZipper(F.everywhere(inc, F.toZipper(vs100)))'
]

const s = new require("benchmark").Suite()
bs.forEach(b => s.add(b, eval("() => " + b)))
s.on('cycle', e => console.log(String(e.target))).run()
{'fraction_non_alphanumeric': 0.25204081632653064, 'fraction_numerical': 0.03979591836734694, 'mean_word_length': 4.874251497005988, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1013600', 'n_tokens_mistral': 430, 'n_tokens_neox': 399, 'n_words': 77}