Browse thread
Case-insensitive lexing
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Jon Harrop <jon@f...> |
| Subject: | Re: [Caml-list] Case-insensitive lexing |
On Friday 23 February 2007 23:39, you wrote: > Because, at least what I think, comparing strings using a hash-table is way > faster than comparing them using pattern-matching. I had always assumed that OCaml would build an optimal dispatch table when pattern matching over strings but it seems you are quite right: it does the worst possible linear string equality tests, not even O(log n) comparisons. That seems like a great shame to me. Can someone implement this? -- Dr Jon D Harrop, Flying Frog Consultancy Ltd. OCaml for Scientists http://www.ffconsultancy.com/products/ocaml_for_scientists