[swift-evolution] Low efficiency multidimensional array problem

Saagar Jha saagar at saagarjha.com
Wed Apr 19 01:39:10 CDT 2017


It might be helpful if you showed a bit more of the code you’re working on, so that we can better see what you’re trying to do. Is there any operation in particular that is slow?

Also, CC’ing swift-users since I think it belongs there.

Saagar Jha

> On Apr 18, 2017, at 22:57, Hbucius Smith via swift-evolution <swift-evolution at swift.org> wrote:
> 
> Hello Swift community,
> 
> 
>     When I used multidimensional array in swift, I found it is very low efficiency.
> 
>   
>     I used in the following way : 
> 
>    
>     var array = Array.init(repeating: Array.init(repeating: 0, count: 5), count: 5)
>    
>     array[0][0] = 0
> 
>    
>   I have read some posts in stack overflow. It suggests using one dimension to fake multidimensional array. I think it is too ugly. DO we have better choice for this ?
> 
>     
>     
> 
> 
> 
> best wishes for you 
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170418/39807b8e/attachment.html>


More information about the swift-evolution mailing list