Performance optimization

1 markedSymbols cache
2 to avoid repeated calls to the closure