ºÝºÝߣ

ºÝºÝߣShare a Scribd company logo
20170127 tokyoserversideswiftmeetupÙYÁÏ
20170127 tokyoserversideswiftmeetupÙYÁÏ
20170127 tokyoserversideswiftmeetupÙYÁÏ
20170127 tokyoserversideswiftmeetupÙYÁÏ
20170127 tokyoserversideswiftmeetupÙYÁÏ
20170127 tokyoserversideswiftmeetupÙYÁÏ
20170127 tokyoserversideswiftmeetupÙYÁÏ
20170127 tokyoserversideswiftmeetupÙYÁÏ
20170127 tokyoserversideswiftmeetupÙYÁÏ
20170127 tokyoserversideswiftmeetupÙYÁÏ
20170127 tokyoserversideswiftmeetupÙYÁÏ
20170127 tokyoserversideswiftmeetupÙYÁÏ
20170127 tokyoserversideswiftmeetupÙYÁÏ
20170127 tokyoserversideswiftmeetupÙYÁÏ
20170127 tokyoserversideswiftmeetupÙYÁÏ
20170127 tokyoserversideswiftmeetupÙYÁÏ
Swift C
var kev = kevent();
kev.ident = UInt(socket);
kev.filter = Int16(EVFILT_READ);
kev.flags = UInt16(flags);
kev.data = 0;
ret = kevent(kq, &kev, 1, nil, 0, nil)
C
thread pool
GCD pthread(C
mutex
pthread_cond ( C 1
1
Swift O(1)
data race)
mutex
class AsyncQueue<T> : AsyncQueueType<T> {
var queue = [T]()
override func put(obj: T) throws {
mutex.lock()
defer {
mutex.unlock()
}
queue += [obj]
}
override func get() throws -> T? {
mutex.lock()
defer {
mutex.unlock()
}
queue.remove(at: 0)
}
20170127 tokyoserversideswiftmeetupÙYÁÏ
20170127 tokyoserversideswiftmeetupÙYÁÏ
?
?
?
?
?
?
?
?
?
?
20170127 tokyoserversideswiftmeetupÙYÁÏ
20170127 tokyoserversideswiftmeetupÙYÁÏ
protocol GenericQueue{
associatedtype A
}
class QueueA<B> : GenericQueue{
typealias A = B
}
class QueueB<B> : GenericQueue{ // Queue
typealias A = B
}
typealias ClosureType = () -> Void
class QueueUser {
func useQueue(queue: GenericQueue<ClosureType>) { // ?
}
}
20170127 tokyoserversideswiftmeetupÙYÁÏ
20170127 tokyoserversideswiftmeetupÙYÁÏ
20170127 tokyoserversideswiftmeetupÙYÁÏ
20170127 tokyoserversideswiftmeetupÙYÁÏ
Swift Array O(1)
Swift Array RangeReplaceableCollection extension
public struct Array<Element> : RandomAccessCollection, MutableCollection {
extension Array : RangeReplaceableCollection {
Swift Array
github: swift/stdlib/public/core/Arrays.swift.gyb

gyb = Generate Your Boilerplate

Python
Python
Arrays.swift.gyb
extension ${Self} : RangeReplaceableCollection, _ArrayProtocol {
??? public mutating func append<S : Sequence>(contentsOf newElements: S)
??????? where S.Iterator.Element == Element {
??????????? let oldCount = self.count
??????????? let capacity = self.capacity
??????????? let newCount = oldCount + newElements.underestimatedCount
???????????
??????????? if newCount > capacity {
??????????????? self.reserveCapacity(
??????????????????? Swift.max(newCount, _growArrayCapacity(capacity)))
??????????? }
??????????? _arrayAppendSequence(&self._buffer, newElements)
}
_growArrayCapacity
internal func _growArrayCapacity(_ capacity: Int) -> Int {
??? return capacity * 2
}
capacity 2
O(1)
Wikipedia Amortized analysis
https://en.wikipedia.org/wiki/Amortized_analysis
20170127 tokyoserversideswiftmeetupÙYÁÏ

More Related Content

What's hot (20)

Text Rendering Tech
Text Rendering TechText Rendering Tech
Text Rendering Tech
David Ding
?
Yurii Shevtsov "V8 + libuv = Node.js. Under the hood"
Yurii Shevtsov "V8 + libuv = Node.js. Under the hood"Yurii Shevtsov "V8 + libuv = Node.js. Under the hood"
Yurii Shevtsov "V8 + libuv = Node.js. Under the hood"
OdessaJS Conf
?
Timur Shemsedinov "§±§Ú§ê§å §ß§Ñ §Ü§à§Ý§Ò§Ö§Ü§Ñ§ç, §Ñ §é§ä§à... (§¡§ã§Ú§ß§ç§â§à§ß§ß§à§Ö §á§â§à§Ô§â§Ñ§Þ§Þ§Ú§â§à§Ó§Ñ§ß§Ú§Ö)"
Timur Shemsedinov "§±§Ú§ê§å §ß§Ñ §Ü§à§Ý§Ò§Ö§Ü§Ñ§ç, §Ñ §é§ä§à... (§¡§ã§Ú§ß§ç§â§à§ß§ß§à§Ö §á§â§à§Ô§â§Ñ§Þ§Þ§Ú§â§à§Ó§Ñ§ß§Ú§Ö)"Timur Shemsedinov "§±§Ú§ê§å §ß§Ñ §Ü§à§Ý§Ò§Ö§Ü§Ñ§ç, §Ñ §é§ä§à... (§¡§ã§Ú§ß§ç§â§à§ß§ß§à§Ö §á§â§à§Ô§â§Ñ§Þ§Þ§Ú§â§à§Ó§Ñ§ß§Ú§Ö)"
Timur Shemsedinov "§±§Ú§ê§å §ß§Ñ §Ü§à§Ý§Ò§Ö§Ü§Ñ§ç, §Ñ §é§ä§à... (§¡§ã§Ú§ß§ç§â§à§ß§ß§à§Ö §á§â§à§Ô§â§Ñ§Þ§Þ§Ú§â§à§Ó§Ñ§ß§Ú§Ö)"
OdessaJS Conf
?
Address/Thread/Memory Sanitizer
Address/Thread/Memory SanitizerAddress/Thread/Memory Sanitizer
Address/Thread/Memory Sanitizer
Platonov Sergey
?
Bartosz Milewski, ¡°Re-discovering Monads in C++¡±
Bartosz Milewski, ¡°Re-discovering Monads in C++¡±Bartosz Milewski, ¡°Re-discovering Monads in C++¡±
Bartosz Milewski, ¡°Re-discovering Monads in C++¡±
Platonov Sergey
?
How to add an optimization for C# to RyuJIT
How to add an optimization for C# to RyuJITHow to add an optimization for C# to RyuJIT
How to add an optimization for C# to RyuJIT
Egor Bogatov
?
Vectorization in ATLAS
Vectorization in ATLASVectorization in ATLAS
Vectorization in ATLAS
Roberto Agostino Vitillo
?
On using Haskell DSL - CLaSH, to implement a simple digital stopwatch on FPGA
On using Haskell DSL - CLaSH, to implement a simple digital stopwatch on FPGAOn using Haskell DSL - CLaSH, to implement a simple digital stopwatch on FPGA
On using Haskell DSL - CLaSH, to implement a simple digital stopwatch on FPGA
mjgajda
?
Reactive x
Reactive xReactive x
Reactive x
Gabriel Araujo
?
Modern c++ Memory Management
Modern c++ Memory ManagementModern c++ Memory Management
Modern c++ Memory Management
Alan Uthoff
?
C c++-meetup-1nov2017-autofdo
C c++-meetup-1nov2017-autofdoC c++-meetup-1nov2017-autofdo
C c++-meetup-1nov2017-autofdo
Kim Phillips
?
20140531 serebryany lecture01_fantastic_cpp_bugs
20140531 serebryany lecture01_fantastic_cpp_bugs20140531 serebryany lecture01_fantastic_cpp_bugs
20140531 serebryany lecture01_fantastic_cpp_bugs
Computer Science Club
?
DIGITAL SIGNAL PROCESSING BASED ON MATLAB
DIGITAL SIGNAL PROCESSING BASED ON MATLABDIGITAL SIGNAL PROCESSING BASED ON MATLAB
DIGITAL SIGNAL PROCESSING BASED ON MATLAB
Prashant Srivastav
?
A look into the sanitizer family (ASAN & UBSAN) by Akul Pillai
A look into the sanitizer family (ASAN & UBSAN) by Akul PillaiA look into the sanitizer family (ASAN & UBSAN) by Akul Pillai
A look into the sanitizer family (ASAN & UBSAN) by Akul Pillai
Cysinfo Cyber Security Community
?
20140531 serebryany lecture02_find_scary_cpp_bugs
20140531 serebryany lecture02_find_scary_cpp_bugs20140531 serebryany lecture02_find_scary_cpp_bugs
20140531 serebryany lecture02_find_scary_cpp_bugs
Computer Science Club
?
Sequential Circuits I VLSI 9th experiment
Sequential Circuits I VLSI 9th experimentSequential Circuits I VLSI 9th experiment
Sequential Circuits I VLSI 9th experiment
Gouthaman V
?
Workshop@naha val3
Workshop@naha val3Workshop@naha val3
Workshop@naha val3
Shusaku Fukumine
?
Gray code
Gray code Gray code
Gray code
pravat1069
?
Extend R with Rcpp!!!
Extend R with Rcpp!!!Extend R with Rcpp!!!
Extend R with Rcpp!!!
mickey24
?
Multi qubit entanglement
Multi qubit entanglementMulti qubit entanglement
Multi qubit entanglement
Vijayananda Mohire
?
Text Rendering Tech
Text Rendering TechText Rendering Tech
Text Rendering Tech
David Ding
?
Yurii Shevtsov "V8 + libuv = Node.js. Under the hood"
Yurii Shevtsov "V8 + libuv = Node.js. Under the hood"Yurii Shevtsov "V8 + libuv = Node.js. Under the hood"
Yurii Shevtsov "V8 + libuv = Node.js. Under the hood"
OdessaJS Conf
?
Timur Shemsedinov "§±§Ú§ê§å §ß§Ñ §Ü§à§Ý§Ò§Ö§Ü§Ñ§ç, §Ñ §é§ä§à... (§¡§ã§Ú§ß§ç§â§à§ß§ß§à§Ö §á§â§à§Ô§â§Ñ§Þ§Þ§Ú§â§à§Ó§Ñ§ß§Ú§Ö)"
Timur Shemsedinov "§±§Ú§ê§å §ß§Ñ §Ü§à§Ý§Ò§Ö§Ü§Ñ§ç, §Ñ §é§ä§à... (§¡§ã§Ú§ß§ç§â§à§ß§ß§à§Ö §á§â§à§Ô§â§Ñ§Þ§Þ§Ú§â§à§Ó§Ñ§ß§Ú§Ö)"Timur Shemsedinov "§±§Ú§ê§å §ß§Ñ §Ü§à§Ý§Ò§Ö§Ü§Ñ§ç, §Ñ §é§ä§à... (§¡§ã§Ú§ß§ç§â§à§ß§ß§à§Ö §á§â§à§Ô§â§Ñ§Þ§Þ§Ú§â§à§Ó§Ñ§ß§Ú§Ö)"
Timur Shemsedinov "§±§Ú§ê§å §ß§Ñ §Ü§à§Ý§Ò§Ö§Ü§Ñ§ç, §Ñ §é§ä§à... (§¡§ã§Ú§ß§ç§â§à§ß§ß§à§Ö §á§â§à§Ô§â§Ñ§Þ§Þ§Ú§â§à§Ó§Ñ§ß§Ú§Ö)"
OdessaJS Conf
?
Address/Thread/Memory Sanitizer
Address/Thread/Memory SanitizerAddress/Thread/Memory Sanitizer
Address/Thread/Memory Sanitizer
Platonov Sergey
?
Bartosz Milewski, ¡°Re-discovering Monads in C++¡±
Bartosz Milewski, ¡°Re-discovering Monads in C++¡±Bartosz Milewski, ¡°Re-discovering Monads in C++¡±
Bartosz Milewski, ¡°Re-discovering Monads in C++¡±
Platonov Sergey
?
How to add an optimization for C# to RyuJIT
How to add an optimization for C# to RyuJITHow to add an optimization for C# to RyuJIT
How to add an optimization for C# to RyuJIT
Egor Bogatov
?
On using Haskell DSL - CLaSH, to implement a simple digital stopwatch on FPGA
On using Haskell DSL - CLaSH, to implement a simple digital stopwatch on FPGAOn using Haskell DSL - CLaSH, to implement a simple digital stopwatch on FPGA
On using Haskell DSL - CLaSH, to implement a simple digital stopwatch on FPGA
mjgajda
?
Modern c++ Memory Management
Modern c++ Memory ManagementModern c++ Memory Management
Modern c++ Memory Management
Alan Uthoff
?
C c++-meetup-1nov2017-autofdo
C c++-meetup-1nov2017-autofdoC c++-meetup-1nov2017-autofdo
C c++-meetup-1nov2017-autofdo
Kim Phillips
?
20140531 serebryany lecture01_fantastic_cpp_bugs
20140531 serebryany lecture01_fantastic_cpp_bugs20140531 serebryany lecture01_fantastic_cpp_bugs
20140531 serebryany lecture01_fantastic_cpp_bugs
Computer Science Club
?
DIGITAL SIGNAL PROCESSING BASED ON MATLAB
DIGITAL SIGNAL PROCESSING BASED ON MATLABDIGITAL SIGNAL PROCESSING BASED ON MATLAB
DIGITAL SIGNAL PROCESSING BASED ON MATLAB
Prashant Srivastav
?
A look into the sanitizer family (ASAN & UBSAN) by Akul Pillai
A look into the sanitizer family (ASAN & UBSAN) by Akul PillaiA look into the sanitizer family (ASAN & UBSAN) by Akul Pillai
A look into the sanitizer family (ASAN & UBSAN) by Akul Pillai
Cysinfo Cyber Security Community
?
20140531 serebryany lecture02_find_scary_cpp_bugs
20140531 serebryany lecture02_find_scary_cpp_bugs20140531 serebryany lecture02_find_scary_cpp_bugs
20140531 serebryany lecture02_find_scary_cpp_bugs
Computer Science Club
?
Sequential Circuits I VLSI 9th experiment
Sequential Circuits I VLSI 9th experimentSequential Circuits I VLSI 9th experiment
Sequential Circuits I VLSI 9th experiment
Gouthaman V
?
Extend R with Rcpp!!!
Extend R with Rcpp!!!Extend R with Rcpp!!!
Extend R with Rcpp!!!
mickey24
?

Similar to 20170127 tokyoserversideswiftmeetupÙYÁÏ (20)

Lego: A brick system build by scala
Lego: A brick system build by scalaLego: A brick system build by scala
Lego: A brick system build by scala
lunfu zhong
?
Vhdl programs
Vhdl programsVhdl programs
Vhdl programs
Kirthika Natarajan
?
Digital system design lab manual
Digital system design lab manualDigital system design lab manual
Digital system design lab manual
Santhosh Poralu
?
Digital to analog -Sqaure waveform generator in VHDL
Digital to analog -Sqaure waveform generator in VHDLDigital to analog -Sqaure waveform generator in VHDL
Digital to analog -Sqaure waveform generator in VHDL
Omkar Rane
?
Queuing theory is a branch of mathematics that studies the behavior of waitin...
Queuing theory is a branch of mathematics that studies the behavior of waitin...Queuing theory is a branch of mathematics that studies the behavior of waitin...
Queuing theory is a branch of mathematics that studies the behavior of waitin...
Sonam704174
?
The Ring programming language version 1.3 book - Part 84 of 88
The Ring programming language version 1.3 book - Part 84 of 88The Ring programming language version 1.3 book - Part 84 of 88
The Ring programming language version 1.3 book - Part 84 of 88
Mahmoud Samir Fayed
?
HDL PROGRAMMING-3.pdf
HDL PROGRAMMING-3.pdfHDL PROGRAMMING-3.pdf
HDL PROGRAMMING-3.pdf
kaarthikK6
?
C++11
C++11C++11
C++11
Andrey Dankevich
?
Java Concurrency Idioms
Java Concurrency IdiomsJava Concurrency Idioms
Java Concurrency Idioms
Alex Miller
?
Unit 3 - Styles of Modeling-1 for resource management techniques
Unit 3 - Styles of Modeling-1 for resource management techniquesUnit 3 - Styles of Modeling-1 for resource management techniques
Unit 3 - Styles of Modeling-1 for resource management techniques
MrFanatic1
?
cipherrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr.ppt
cipherrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr.pptcipherrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr.ppt
cipherrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr.ppt
SnehaPavithran6
?
User Defined Aggregation in Apache Spark: A Love Story
User Defined Aggregation in Apache Spark: A Love StoryUser Defined Aggregation in Apache Spark: A Love Story
User Defined Aggregation in Apache Spark: A Love Story
Databricks
?
User Defined Aggregation in Apache Spark: A Love Story
User Defined Aggregation in Apache Spark: A Love StoryUser Defined Aggregation in Apache Spark: A Love Story
User Defined Aggregation in Apache Spark: A Love Story
Databricks
?
Egor Bogatov - .NET Core intrinsics and other micro-optimizations
Egor Bogatov - .NET Core intrinsics and other micro-optimizationsEgor Bogatov - .NET Core intrinsics and other micro-optimizations
Egor Bogatov - .NET Core intrinsics and other micro-optimizations
Egor Bogatov
?
PVS-Studio team experience: checking various open source projects, or mistake...
PVS-Studio team experience: checking various open source projects, or mistake...PVS-Studio team experience: checking various open source projects, or mistake...
PVS-Studio team experience: checking various open source projects, or mistake...
Andrey Karpov
?
Marat-ºÝºÝߣs
Marat-ºÝºÝߣsMarat-ºÝºÝߣs
Marat-ºÝºÝߣs
Marat Vyshegorodtsev
?
3
33
3
Marat Vyshegorodtsev
?
Pointcuts and Analysis
Pointcuts and AnalysisPointcuts and Analysis
Pointcuts and Analysis
Wiwat Ruengmee
?
VHDL summary.pdf
VHDL summary.pdfVHDL summary.pdf
VHDL summary.pdf
wafawafa52
?
Infinum iOS Talks #1 - Swift under the hood: Method Dispatching by Vlaho Poluta
Infinum iOS Talks #1 - Swift under the hood: Method Dispatching by Vlaho PolutaInfinum iOS Talks #1 - Swift under the hood: Method Dispatching by Vlaho Poluta
Infinum iOS Talks #1 - Swift under the hood: Method Dispatching by Vlaho Poluta
Infinum
?
Lego: A brick system build by scala
Lego: A brick system build by scalaLego: A brick system build by scala
Lego: A brick system build by scala
lunfu zhong
?
Digital system design lab manual
Digital system design lab manualDigital system design lab manual
Digital system design lab manual
Santhosh Poralu
?
Digital to analog -Sqaure waveform generator in VHDL
Digital to analog -Sqaure waveform generator in VHDLDigital to analog -Sqaure waveform generator in VHDL
Digital to analog -Sqaure waveform generator in VHDL
Omkar Rane
?
Queuing theory is a branch of mathematics that studies the behavior of waitin...
Queuing theory is a branch of mathematics that studies the behavior of waitin...Queuing theory is a branch of mathematics that studies the behavior of waitin...
Queuing theory is a branch of mathematics that studies the behavior of waitin...
Sonam704174
?
The Ring programming language version 1.3 book - Part 84 of 88
The Ring programming language version 1.3 book - Part 84 of 88The Ring programming language version 1.3 book - Part 84 of 88
The Ring programming language version 1.3 book - Part 84 of 88
Mahmoud Samir Fayed
?
HDL PROGRAMMING-3.pdf
HDL PROGRAMMING-3.pdfHDL PROGRAMMING-3.pdf
HDL PROGRAMMING-3.pdf
kaarthikK6
?
Java Concurrency Idioms
Java Concurrency IdiomsJava Concurrency Idioms
Java Concurrency Idioms
Alex Miller
?
Unit 3 - Styles of Modeling-1 for resource management techniques
Unit 3 - Styles of Modeling-1 for resource management techniquesUnit 3 - Styles of Modeling-1 for resource management techniques
Unit 3 - Styles of Modeling-1 for resource management techniques
MrFanatic1
?
cipherrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr.ppt
cipherrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr.pptcipherrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr.ppt
cipherrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr.ppt
SnehaPavithran6
?
User Defined Aggregation in Apache Spark: A Love Story
User Defined Aggregation in Apache Spark: A Love StoryUser Defined Aggregation in Apache Spark: A Love Story
User Defined Aggregation in Apache Spark: A Love Story
Databricks
?
User Defined Aggregation in Apache Spark: A Love Story
User Defined Aggregation in Apache Spark: A Love StoryUser Defined Aggregation in Apache Spark: A Love Story
User Defined Aggregation in Apache Spark: A Love Story
Databricks
?
Egor Bogatov - .NET Core intrinsics and other micro-optimizations
Egor Bogatov - .NET Core intrinsics and other micro-optimizationsEgor Bogatov - .NET Core intrinsics and other micro-optimizations
Egor Bogatov - .NET Core intrinsics and other micro-optimizations
Egor Bogatov
?
PVS-Studio team experience: checking various open source projects, or mistake...
PVS-Studio team experience: checking various open source projects, or mistake...PVS-Studio team experience: checking various open source projects, or mistake...
PVS-Studio team experience: checking various open source projects, or mistake...
Andrey Karpov
?
Infinum iOS Talks #1 - Swift under the hood: Method Dispatching by Vlaho Poluta
Infinum iOS Talks #1 - Swift under the hood: Method Dispatching by Vlaho PolutaInfinum iOS Talks #1 - Swift under the hood: Method Dispatching by Vlaho Poluta
Infinum iOS Talks #1 - Swift under the hood: Method Dispatching by Vlaho Poluta
Infinum
?

Recently uploaded (20)

L01 Introduction to Nanoindentation - What is hardness
L01 Introduction to Nanoindentation - What is hardnessL01 Introduction to Nanoindentation - What is hardness
L01 Introduction to Nanoindentation - What is hardness
RostislavDaniel
?
[Webinar] Scaling Made Simple: Getting Started with No-Code Web Apps
[Webinar] Scaling Made Simple: Getting Started with No-Code Web Apps[Webinar] Scaling Made Simple: Getting Started with No-Code Web Apps
[Webinar] Scaling Made Simple: Getting Started with No-Code Web Apps
Safe Software
?
Deno ...................................
Deno ...................................Deno ...................................
Deno ...................................
Robert MacLean
?
Technology use over time and its impact on consumers and businesses.pptx
Technology use over time and its impact on consumers and businesses.pptxTechnology use over time and its impact on consumers and businesses.pptx
Technology use over time and its impact on consumers and businesses.pptx
kaylagaze
?
BoxLang JVM Language : The Future is Dynamic
BoxLang JVM Language : The Future is DynamicBoxLang JVM Language : The Future is Dynamic
BoxLang JVM Language : The Future is Dynamic
Ortus Solutions, Corp
?
THE BIG TEN BIOPHARMACEUTICAL MNCs: GLOBAL CAPABILITY CENTERS IN INDIA
THE BIG TEN BIOPHARMACEUTICAL MNCs: GLOBAL CAPABILITY CENTERS IN INDIATHE BIG TEN BIOPHARMACEUTICAL MNCs: GLOBAL CAPABILITY CENTERS IN INDIA
THE BIG TEN BIOPHARMACEUTICAL MNCs: GLOBAL CAPABILITY CENTERS IN INDIA
Srivaanchi Nathan
?
DealBook of Ukraine: 2025 edition | AVentures Capital
DealBook of Ukraine: 2025 edition | AVentures CapitalDealBook of Ukraine: 2025 edition | AVentures Capital
DealBook of Ukraine: 2025 edition | AVentures Capital
Yevgen Sysoyev
?
Inside Freshworks' Migration from Cassandra to ScyllaDB by Premkumar Patturaj
Inside Freshworks' Migration from Cassandra to ScyllaDB by Premkumar PatturajInside Freshworks' Migration from Cassandra to ScyllaDB by Premkumar Patturaj
Inside Freshworks' Migration from Cassandra to ScyllaDB by Premkumar Patturaj
ScyllaDB
?
SMART SENTRY CYBER THREAT INTELLIGENCE IN IIOT
SMART SENTRY CYBER THREAT INTELLIGENCE IN IIOTSMART SENTRY CYBER THREAT INTELLIGENCE IN IIOT
SMART SENTRY CYBER THREAT INTELLIGENCE IN IIOT
TanmaiArni
?
Field Device Management Market Report 2030 - TechSci Research
Field Device Management Market Report 2030 - TechSci ResearchField Device Management Market Report 2030 - TechSci Research
Field Device Management Market Report 2030 - TechSci Research
Vipin Mishra
?
Early Adopter's Guide to AI Moderation (Preview)
Early Adopter's Guide to AI Moderation (Preview)Early Adopter's Guide to AI Moderation (Preview)
Early Adopter's Guide to AI Moderation (Preview)
nick896721
?
Wondershare Filmora Crack 14.3.2.11147 Latest
Wondershare Filmora Crack 14.3.2.11147 LatestWondershare Filmora Crack 14.3.2.11147 Latest
Wondershare Filmora Crack 14.3.2.11147 Latest
udkg888
?
Brave Browser Crack 1.45.133 Activated 2025
Brave Browser Crack 1.45.133 Activated 2025Brave Browser Crack 1.45.133 Activated 2025
Brave Browser Crack 1.45.133 Activated 2025
kherorpacca00126
?
Unlocking DevOps Secuirty :Vault & Keylock
Unlocking DevOps Secuirty :Vault & KeylockUnlocking DevOps Secuirty :Vault & Keylock
Unlocking DevOps Secuirty :Vault & Keylock
HusseinMalikMammadli
?
Q4 2024 Earnings and Investor Presentation
Q4 2024 Earnings and Investor PresentationQ4 2024 Earnings and Investor Presentation
Q4 2024 Earnings and Investor Presentation
Dropbox
?
Endpoint Backup: 3 Reasons MSPs Ignore It
Endpoint Backup: 3 Reasons MSPs Ignore ItEndpoint Backup: 3 Reasons MSPs Ignore It
Endpoint Backup: 3 Reasons MSPs Ignore It
MSP360
?
Stronger Together: Combining Data Quality and Governance for Confident AI & A...
Stronger Together: Combining Data Quality and Governance for Confident AI & A...Stronger Together: Combining Data Quality and Governance for Confident AI & A...
Stronger Together: Combining Data Quality and Governance for Confident AI & A...
Precisely
?
Transform Your Future with Front-End Development Training
Transform Your Future with Front-End Development TrainingTransform Your Future with Front-End Development Training
Transform Your Future with Front-End Development Training
Vtechlabs
?
UiPath Automation Developer Associate Training Series 2025 - Session 2
UiPath Automation Developer Associate Training Series 2025 - Session 2UiPath Automation Developer Associate Training Series 2025 - Session 2
UiPath Automation Developer Associate Training Series 2025 - Session 2
DianaGray10
?
The Future of Repair: Transparent and Incremental by Botond De?nes
The Future of Repair: Transparent and Incremental by Botond De?nesThe Future of Repair: Transparent and Incremental by Botond De?nes
The Future of Repair: Transparent and Incremental by Botond De?nes
ScyllaDB
?
L01 Introduction to Nanoindentation - What is hardness
L01 Introduction to Nanoindentation - What is hardnessL01 Introduction to Nanoindentation - What is hardness
L01 Introduction to Nanoindentation - What is hardness
RostislavDaniel
?
[Webinar] Scaling Made Simple: Getting Started with No-Code Web Apps
[Webinar] Scaling Made Simple: Getting Started with No-Code Web Apps[Webinar] Scaling Made Simple: Getting Started with No-Code Web Apps
[Webinar] Scaling Made Simple: Getting Started with No-Code Web Apps
Safe Software
?
Deno ...................................
Deno ...................................Deno ...................................
Deno ...................................
Robert MacLean
?
Technology use over time and its impact on consumers and businesses.pptx
Technology use over time and its impact on consumers and businesses.pptxTechnology use over time and its impact on consumers and businesses.pptx
Technology use over time and its impact on consumers and businesses.pptx
kaylagaze
?
BoxLang JVM Language : The Future is Dynamic
BoxLang JVM Language : The Future is DynamicBoxLang JVM Language : The Future is Dynamic
BoxLang JVM Language : The Future is Dynamic
Ortus Solutions, Corp
?
THE BIG TEN BIOPHARMACEUTICAL MNCs: GLOBAL CAPABILITY CENTERS IN INDIA
THE BIG TEN BIOPHARMACEUTICAL MNCs: GLOBAL CAPABILITY CENTERS IN INDIATHE BIG TEN BIOPHARMACEUTICAL MNCs: GLOBAL CAPABILITY CENTERS IN INDIA
THE BIG TEN BIOPHARMACEUTICAL MNCs: GLOBAL CAPABILITY CENTERS IN INDIA
Srivaanchi Nathan
?
DealBook of Ukraine: 2025 edition | AVentures Capital
DealBook of Ukraine: 2025 edition | AVentures CapitalDealBook of Ukraine: 2025 edition | AVentures Capital
DealBook of Ukraine: 2025 edition | AVentures Capital
Yevgen Sysoyev
?
Inside Freshworks' Migration from Cassandra to ScyllaDB by Premkumar Patturaj
Inside Freshworks' Migration from Cassandra to ScyllaDB by Premkumar PatturajInside Freshworks' Migration from Cassandra to ScyllaDB by Premkumar Patturaj
Inside Freshworks' Migration from Cassandra to ScyllaDB by Premkumar Patturaj
ScyllaDB
?
SMART SENTRY CYBER THREAT INTELLIGENCE IN IIOT
SMART SENTRY CYBER THREAT INTELLIGENCE IN IIOTSMART SENTRY CYBER THREAT INTELLIGENCE IN IIOT
SMART SENTRY CYBER THREAT INTELLIGENCE IN IIOT
TanmaiArni
?
Field Device Management Market Report 2030 - TechSci Research
Field Device Management Market Report 2030 - TechSci ResearchField Device Management Market Report 2030 - TechSci Research
Field Device Management Market Report 2030 - TechSci Research
Vipin Mishra
?
Early Adopter's Guide to AI Moderation (Preview)
Early Adopter's Guide to AI Moderation (Preview)Early Adopter's Guide to AI Moderation (Preview)
Early Adopter's Guide to AI Moderation (Preview)
nick896721
?
Wondershare Filmora Crack 14.3.2.11147 Latest
Wondershare Filmora Crack 14.3.2.11147 LatestWondershare Filmora Crack 14.3.2.11147 Latest
Wondershare Filmora Crack 14.3.2.11147 Latest
udkg888
?
Brave Browser Crack 1.45.133 Activated 2025
Brave Browser Crack 1.45.133 Activated 2025Brave Browser Crack 1.45.133 Activated 2025
Brave Browser Crack 1.45.133 Activated 2025
kherorpacca00126
?
Unlocking DevOps Secuirty :Vault & Keylock
Unlocking DevOps Secuirty :Vault & KeylockUnlocking DevOps Secuirty :Vault & Keylock
Unlocking DevOps Secuirty :Vault & Keylock
HusseinMalikMammadli
?
Q4 2024 Earnings and Investor Presentation
Q4 2024 Earnings and Investor PresentationQ4 2024 Earnings and Investor Presentation
Q4 2024 Earnings and Investor Presentation
Dropbox
?
Endpoint Backup: 3 Reasons MSPs Ignore It
Endpoint Backup: 3 Reasons MSPs Ignore ItEndpoint Backup: 3 Reasons MSPs Ignore It
Endpoint Backup: 3 Reasons MSPs Ignore It
MSP360
?
Stronger Together: Combining Data Quality and Governance for Confident AI & A...
Stronger Together: Combining Data Quality and Governance for Confident AI & A...Stronger Together: Combining Data Quality and Governance for Confident AI & A...
Stronger Together: Combining Data Quality and Governance for Confident AI & A...
Precisely
?
Transform Your Future with Front-End Development Training
Transform Your Future with Front-End Development TrainingTransform Your Future with Front-End Development Training
Transform Your Future with Front-End Development Training
Vtechlabs
?
UiPath Automation Developer Associate Training Series 2025 - Session 2
UiPath Automation Developer Associate Training Series 2025 - Session 2UiPath Automation Developer Associate Training Series 2025 - Session 2
UiPath Automation Developer Associate Training Series 2025 - Session 2
DianaGray10
?
The Future of Repair: Transparent and Incremental by Botond De?nes
The Future of Repair: Transparent and Incremental by Botond De?nesThe Future of Repair: Transparent and Incremental by Botond De?nes
The Future of Repair: Transparent and Incremental by Botond De?nes
ScyllaDB
?

20170127 tokyoserversideswiftmeetupÙYÁÏ

  • 17. Swift C var kev = kevent(); kev.ident = UInt(socket); kev.filter = Int16(EVFILT_READ); kev.flags = UInt16(flags); kev.data = 0; ret = kevent(kq, &kev, 1, nil, 0, nil) C
  • 19. Swift O(1) data race) mutex class AsyncQueue<T> : AsyncQueueType<T> { var queue = [T]() override func put(obj: T) throws { mutex.lock() defer { mutex.unlock() } queue += [obj] } override func get() throws -> T? { mutex.lock() defer { mutex.unlock() } queue.remove(at: 0) }
  • 26. protocol GenericQueue{ associatedtype A } class QueueA<B> : GenericQueue{ typealias A = B } class QueueB<B> : GenericQueue{ // Queue typealias A = B } typealias ClosureType = () -> Void class QueueUser { func useQueue(queue: GenericQueue<ClosureType>) { // ? } }
  • 31. Swift Array O(1) Swift Array RangeReplaceableCollection extension public struct Array<Element> : RandomAccessCollection, MutableCollection { extension Array : RangeReplaceableCollection { Swift Array github: swift/stdlib/public/core/Arrays.swift.gyb gyb = Generate Your Boilerplate Python Python
  • 32. Arrays.swift.gyb extension ${Self} : RangeReplaceableCollection, _ArrayProtocol { ??? public mutating func append<S : Sequence>(contentsOf newElements: S) ??????? where S.Iterator.Element == Element { ??????????? let oldCount = self.count ??????????? let capacity = self.capacity ??????????? let newCount = oldCount + newElements.underestimatedCount ??????????? ??????????? if newCount > capacity { ??????????????? self.reserveCapacity( ??????????????????? Swift.max(newCount, _growArrayCapacity(capacity))) ??????????? } ??????????? _arrayAppendSequence(&self._buffer, newElements) } _growArrayCapacity internal func _growArrayCapacity(_ capacity: Int) -> Int { ??? return capacity * 2 } capacity 2 O(1) Wikipedia Amortized analysis https://en.wikipedia.org/wiki/Amortized_analysis