[SR-10682] Swift master, ARC performance regression #53080
Labels
ARC
Feature: automatic reference counting
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
performance
SILOptimizer
Area → compiler: SIL optimization passes
Attachment: Download
Additional Detail from JIRA
md5: 208e526eb5c9a104ccd7933ca893207e
relates to:
Issue Description:
Attached is
cp_perf.swift
which is basically "SwiftNIO in a box". Not really but it contains an approximate implementation of NIO's ChannelPipeline. Something I'm just about to optimise. Whilst doing that I just noticed, that Swift master makes it a lot slower!Repro:
As you can see, the attached file runs in 2.8s for 5.0 and 5.1 but takes 5s on a recent snapshot.
The concrete versions are (all OSS toolchains):
5.0-RELEASE
5.1-DEVELOPMENT-SNAPSHOT-2019-05-09-a
DEVELOPMENT-SNAPSHOT-2019-05-12-a
Why?
Swift decides that we need more retains/releases instead of fewer 😉
Specifically in this function:
we now seem to retain both the existential box and I think (??) the PWT too? The lines that are marked red in the screenshot below are the new retain/releases.
The text was updated successfully, but these errors were encountered: