
19 Feb
2010
19 Feb
'10
7:20 a.m.
2010/2/19 Alberto G. Corona
What is the speed of hProjectByLabel/s in Data.HList.Record? . The documentation in hackage does not mention it. Perhaps this is because Hlist is designed for supposedly short records and this does not matter too much. looking at the code I guess that everything in HList is O(n) because it uses type-level list structure, but I think that nothing prevents from using a type level balanced tree, Data.Map style, instead.
GHC could inline most of what looks like O(n). And, actually, what looks like O(n) at the compile time is O(1) at runtime. This is so because it is really hard to create types at runtime. ;)