Has anyone done a performance analysis on the use of the lens concept in various languages? Given it is essentially duplicating data for every set it would seem to produce a lot of garbage for whatever memory allocator style is in use.
In haskell they're optimized out, but some delicate work has gone into ensuring that. They're actually faster than alternative methods in some cases, uniplate was rewritten in lenses and got faster and with better type safety as well.