[SR-7952] Performance of lazy compactMap is terrible #50487
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
regression
SILOptimizer
Area → compiler: SIL optimization passes
swift 4.1
Additional Detail from JIRA
md5: 472a6fc38d023d4100ea2188bc387c7d
Issue Description:
In the following code, the
flatMap
(used for compatibility with swift 4.0.3) performs much worse than thefilter
+map
under a-O
build.Output under swift 4.1 as far back as the 2017 October 25 snapshot (oldest I could find):
Output under swift 4.0.3 release:
The text was updated successfully, but these errors were encountered: