title: Efficiently checking for a rare occurrence
body: <p>I have to process many millions of data records. A data record has a record-type string at the beginning of a record. Processing is record-type-dependent but does not require to 'if'/'elsif' the type, just selecting an array-slice mask from a hash.</p>
  
  <p>However, on the order of once-per-million I might encounter a record type that require a totally different kind of processing.</p>
  
  <p>I hate to insert an 'if' testing for this record type that will return 'true' so rarely.</p>
  
  <p>Any suggestions?</p>
  
  <p>Thanks</p>
  
  <p>Meir</p>