kth.sePublications
Change search
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • Other style
More styles
Language
  • de-DE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • sv-SE
  • Other locale
More languages
Output format
  • html
  • text
  • asciidoc
  • rtf
Evaluating Swift concurrency on the iOS platform: A performance analysis of the task-based concurrency model in Swift 5.5
KTH, School of Electrical Engineering and Computer Science (EECS).
2022 (English)Independent thesis Advanced level (degree of Master (Two Years)), 20 credits / 30 HE creditsStudent thesisAlternative title
Utvärdering av Swift concurrency på iOS-plattformen : En prestandautvärdering av den task-baserade concurrency-modellen i Swift 5.5 (Swedish)
Abstract [en]

Due to limitations in hardware, raising processor clock speeds is no longer the primary way to increase computing performance. Instead, computing devices are equipped with multiple processors (they are multi-core) to increase performance by enabling parallel execution of code. To fully utilize all available computational power, programs need to be concurrent, i.e. be able to manage multiple tasks at the same time. To this end, programming languages and platforms often provide a concurrency model that allows developers to construct concurrent programs. These models can vary both in design and implementation. In September of 2021, a new version of the Swift programming language, most commonly used to develop mobile applications on Apple’s iOS platform, was released. This release introduced a new concurrency model, Swift concurrency (SC), featuring e.g. structured concurrency and the async/await pattern. The performance of a concurrency model is important, not the least because end users expect applications to be responsive and performant. This thesis investigates Swift’s new concurrency model from a performance perspective, comparing it to a previous model, Grand Central Dispatch (GCD). Six benchmark applications are developed and implemented in both the GCD and the Swift concurrency models. Three of the benchmarks are focused on exercising separate parts of the models in isolation. The other three use the models to solve classical computational problems: Fibonacci numbers, N-Queens problem, and matrix multiplication. A performance analysis is carried out to study the differences in execution time and memory consumption between the two models. The results show differences between the two models, especially in execution time, and indicate that neither model consistently outperforms the other. Finally, some possible avenues for future work are identified.

Abstract [sv]

På grund av begränsningar i hårdvara går det inte längre att öka datorprestanda genom att enbart öka klockfrekvensen hos processorer. Datorer förses numera istället med flera processorer (s.k. multi-core) för att öka prestanda genom att möjliggöra parallell exekvering av kod. För att till fullo kunna utnyttja all tillgänglig datorkraft så måste program vara concurrent, det vill säga att de måste kunna hantera flera olika uppgifter samtidigt. För detta ändamål tillhandahåller programmeringsspråk och plattformar ofta en concurrency-modell som låter utvecklare konstruera program som är concurrent. Dessa modeller kan variera både i design och i hur de är implementerade. I september 2021 så släpptes en ny version av programmeringsspråket Swift, som främst används för att utveckla mobilapplikationer på Apples iOS-plattform. Den nya versionen introducerade en ny concurrency-modell, Swift concurrency, med bland annat strukturerad concurrency och async/await-mönstret. Prestandan i en concurrency-modell är viktig att beakta, inte minst för att användare förväntar sig att applikationer ska vara responsiva och kraftfulla. Denna studie utvärderar den nya concurrency-modellen ur ett prestandaperspektiv, och jämför den med en tidigare modell, Grand Central Dispatch (GCD). Sex stycken benchmark-applikationer skapas och implementeras i både GCD- och Swift concurrency-modellerna. Tre av våra benchmarks fokuserar på att utvärdera enskilda delar av modellerna var för sig. De andra tre använder modellerna för att lösa klassiska beräkningsproblem: Fibonacci-tal, N-Queens-problemet, och matrismultiplikation. En prestandaanalys utförs för att studera skillnaderna i exekveringstid och minnesanvändning mellan de två modellerna. Resultaten visar på skillnader mellan de två modellerna, särskilt i exekveringstid, och indikerar att ingendera modell konsekvent presterar bättre än den andra. Slutligen identifieras några möjliga vägar för framtida arbete.

Place, publisher, year, edition, pages
2022. , p. 97
Series
TRITA-EECS-EX ; 2022:713
Keywords [en]
Task-based concurrency, Mobile, Benchmarking, Swift, iOS
Keywords [sv]
Task-baserad concurrency, Mobil, Benchmarking, Swift, iOS
National Category
Computer and Information Sciences
Identifiers
URN: urn:nbn:se:kth:diva-321471OAI: oai:DiVA.org:kth-321471DiVA, id: diva2:1711132
External cooperation
Bontouch AB
Supervisors
Examiners
Available from: 2022-12-05 Created: 2022-11-16 Last updated: 2022-12-05Bibliographically approved

Open Access in DiVA

fulltext(8277 kB)1486 downloads
File information
File name FULLTEXT02.pdfFile size 8277 kBChecksum SHA-512
73177d571f421dde6567c4942118d2ff8a149ae9d82522918571318f7bd34beeaef0832e60bad1964d0a20cd8e445240c74b903034d0ea55880ebdbbf78edd68
Type fulltextMimetype application/pdf

By organisation
School of Electrical Engineering and Computer Science (EECS)
Computer and Information Sciences

Search outside of DiVA

GoogleGoogle Scholar
Total: 1486 downloads
The number of downloads is the sum of all downloads of full texts. It may include eg previous versions that are now no longer available

urn-nbn

Altmetric score

urn-nbn
Total: 607 hits
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • Other style
More styles
Language
  • de-DE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • sv-SE
  • Other locale
More languages
Output format
  • html
  • text
  • asciidoc
  • rtf