You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 16, 2025. It is now read-only.
It seems Swift for the RPi has performance issues. The following program is a good example.
// Swift 5.1.2 - 1mil3.swift
vars=""vart=""vara=[Int]()forxin1...1000000{
s +=String(UnicodeScalar(UInt8(((x -1)%26)+65)))
a.append(x)if s.count ==26{
t += s
s =""}}letr=String(t.reversed())print("r LEN: ", r.count)print("Front: \(r.prefix(26))")print("Back: \(r.suffix(26))")print("UBVal: ",a[100000-1])
It seems Swift for the RPi has performance issues. The following program is a good example.
RPI 4B 4GB
(Without String reverse)
Ubuntu Lenovo Laptop
Swift 4.1.5 Windows Lenovo Laptop
The Swift Online Playground also returns a result almost instantly.
Something is horribly wrong IMHO.