<commit_before>(module run mzscheme
  (define input-map
    `(
      ("ackermann.ss" "11")
      ("ary.ss" "9000")
      ("binarytrees.ss" "16")
      ("chameneos.ss" "1000000")
      ("cheapconcurrency.ss" "15000")
      ("echo.ss" "150000")
      ("except.ss" "2500000")
      ("fannkuch.ss" "10")
      ("fasta.ss" "25000000")
      ("fibo.ss" "32")
      ("hash.ss" "100000")
      ("hash2.ss" "200")
      ("heapsort.ss" "100000")
      ("lists.ss" "18")
      ("mandelbrot.ss" "3000")
      ("matrix.ss" "600")
      ("moments.ss") ; 200 somethings...
      ("nbody.ss" "20000000")
      ("nestedloop.ss" "18")
      ("nsieve.ss" "9")
      ("nsievebits.ss" "11")
      ("partialsums.ss" "2500000")
      ("pidigits.ss" "2500")
      ("pidigits1.ss")
      ("random.ss" "900000")
      ("recursive.ss" "11")
      ("regexmatch.ss")
      ("regexpdna.ss" #f ,(lambda () (mk-regexpdna-input)))
      ("reversecomplement.ss" #f ,(lambda () (mk-revcomp-input)))
      ("k-nucleotide.ss" #f ,(lambda () (mk-knuc-input)))
      ("reversefile.ss")
      ("sieve.ss" "1200")
      ("spellcheck.ss")
      ("spectralnorm.ss" "5500")
      ("strcat.ss" "40000")
      ("sumcol.ss" #f ,(lambda () (mk-sumcol-input)))
      ("wc.ss")
      ("wordfreq.ss")
      ))

  (define (dynreq f)
    (dynamic-require f #f))

  (define (mk-fasta n suffix)
    (let ([f (build-path (find-system-path 'temp-dir) (string-append "fasta-" suffix))])
      (unless (file-exists? f)
        (printf "Building FASTA ~a output for input: ~a\n" n f)
        (with-output-to-file f
          (lambda ()
            (parameterize ([current-command-line-arguments (vector n)])
              (dynreq "fasta.ss")))))
      f))

  (define (mk-revcomp-input)
    (mk-fasta "2500000" "2m5"))

  (define (mk-knuc-input)
    (mk-fasta "1000000" "1m"))

  (define (mk-regexpdna-input)
    (mk-fasta "5000000" "5m"))

  (define (mk-sumcol-input)
    (let ([f (build-path (find-system-path 'temp-dir) "sumcol-21k")])
      (unless (file-exists? f)
        (printf "Building sumcol 21000 input: ~a\n" f)
        (let ([c (with-input-from-file (build-path (collection-path "tests")
                                                   "mzscheme"
                                                   "benchmarks"
                                                   "shootout"<commit_msg>Fix run to dynamic-require relative to the shootout directory.<commit_after>(module run mzscheme
  (require (only scheme/runtime-path define-runtime-path))
  (define input-map
    `(
      ("ackermann.ss" "11")
      ("ary.ss" "9000")
      ("binarytrees.ss" "16")
      ("chameneos.ss" "1000000")
      ("cheapconcurrency.ss" "15000")
      ("echo.ss" "150000")
      ("except.ss" "2500000")
      ("fannkuch.ss" "10")
      ("fasta.ss" "25000000")
      ("fibo.ss" "32")
      ("hash.ss" "100000")
      ("hash2.ss" "200")
      ("heapsort.ss" "100000")
      ("lists.ss" "18")
      ("mandelbrot.ss" "3000")
      ("matrix.ss" "600")
      ("moments.ss") ; 200 somethings...
      ("nbody.ss" "20000000")
      ("nestedloop.ss" "18")
      ("nsieve.ss" "9")
      ("nsievebits.ss" "11")
      ("partialsums.ss" "2500000")
      ("pidigits.ss" "2500")
      ("pidigits1.ss")
      ("random.ss" "900000")
      ("recursive.ss" "11")
      ("regexmatch.ss")
      ("regexpdna.ss" #f ,(lambda () (mk-regexpdna-input)))
      ("reversecomplement.ss" #f ,(lambda () (mk-revcomp-input)))
      ("k-nucleotide.ss" #f ,(lambda () (mk-knuc-input)))
      ("reversefile.ss")
      ("sieve.ss" "1200")
      ("spellcheck.ss")
      ("spectralnorm.ss" "5500")
      ("strcat.ss" "40000")
      ("sumcol.ss" #f ,(lambda () (mk-sumcol-input)))
      ("wc.ss")
      ("wordfreq.ss")
      ))

  (define-runtime-path here ".")

  (define (dynreq f)
    (parameterize ([current-load-relative-directory here])
      (dynamic-require f #f)))

  (define (mk-fasta n suffix)
    (let ([f (build-path (find-system-path 'temp-dir) (string-append "fasta-" suffix))])
      (unless (file-exists? f)
        (printf "Building FASTA ~a output for input: ~a\n" n f)
        (with-output-to-file f
          (lambda ()
            (parameterize ([current-command-line-arguments (vector n)])
              (dynreq "fasta.ss")))))
      f))

  (define (mk-revcomp-input)
    (mk-fasta "2500000" "2m5"))

  (define (mk-knuc-input)
    (mk-fasta "1000000" "1m"))

  (define (mk-regexpdna-input)
    (mk-fasta "5000000" "5m"))

  (define (mk-sumcol-input)
    (let ([f (build-path (find-system-path 'temp-dir) "sumcol-21k")])
      (unless (file-exists? f)
        (printf "Building sumcol 21000 input: ~a\n" f)
        (let ([c (with-input-from-file (build-path (collection-path "tests")
                                                   "mzscheme"
                                                   "benchmarks"
                                                   "shootout"
{'fraction_non_alphanumeric': 0.19574119574119575, 'fraction_numerical': 0.06183456183456183, 'mean_word_length': 2.026641883519207, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, 'word_list_counts': {'cursed_substrings.json': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6607747', 'n_tokens_mistral': 1981, 'n_tokens_neox': 1732, 'n_words': 350}