{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreictysptqdmprzicpcwzvlf4a7udf75lulg4anp36uqsu4vokv6pay",
    "uri": "at://did:plc:pi6woz4d47bkuws673w2il2r/app.bsky.feed.post/3mjtv3ygefhu2"
  },
  "path": "/t/blog-5x-speedup-changing-break-to-elemindex/13946#post_3",
  "publishedAt": "2026-04-19T10:34:19.000Z",
  "site": "https://discourse.haskell.org",
  "textContent": "Very cool! This is a nice general optimization.\n\nIn your specific case, I think there is a much easier solution though. `git grep` has already parsed the exact match you’re looking for and you only need to re-parse every line because your git grep returns the _entire_ line.\nIf you tell it to return only the exact matches (with `git grep -o` and a pattern that includes the contents of the references like with -E: `(@|#)\\(ref:[^)]*\\)`, then you will get one result per match (instead of one per line) and only need to trimm off the first and last character",
  "title": "[Blog] 5x speedup changing break to elemIndex!"
}