[swift-dev] Very slow Set<String>(arrayOfStrings) for some arrayOfStrings

Nadav Rotem nrotem at apple.com
Tue Mar 1 16:58:57 CST 2016


Hi Jens,

Thanks for reporting this issue. I don’t know what’s going on but we’ll take a look. 

I think it would be great if you could add this program as a benchmark under swift/benchmarks/.  This will allow us to track the performance of this test and ensure that we don’t regress. 

Thanks,
Nadav 

> On Mar 1, 2016, at 5:01 AM, Jens Persson via swift-dev <swift-dev at swift.org> wrote:
> 
> For some particular arrays of strings, creating a Set<String>(arrayOfStrings) takes about 100 to 200 times longer than for other very similar arrays of strings (equally many unique simple [a-zA-Z ]+ strings).
> 
> I've put together a tiny program to demonstrate the problem here:
> http://sloppyfocus.com/slowSetFromParticularButSeeminglyNormalArrayOfStrings.html <http://sloppyfocus.com/slowSetFromParticularButSeeminglyNormalArrayOfStrings.html>
> 
> Is this due to a bug / performance problem in Set or can it be explained (and solved) in some way?
> 
> /Jens
> 
> _______________________________________________
> swift-dev mailing list
> swift-dev at swift.org
> https://lists.swift.org/mailman/listinfo/swift-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-dev/attachments/20160301/b097e064/attachment.html>


More information about the swift-dev mailing list