- Learning Concurrency in Kotlin
- Miguel Angel Castiblanco Torres
- 219字
- 2021-08-05 10:46:42
I/O-bound
I/O-bound, on the other hand, are algorithms that rely on input/output devices, so their execution times depend on the speed of those devices, for example, an algorithm that reads a file and passes each word in the document to filterPalindromes() in order to print the palindromes in the document. Changing a few lines of the previous example will do:
fun main(args: Array<String>) {
val words = readWordsFromJson("resources/words.json")
filterPalindromes(words).forEach {
println(it)
}
}
The readWordsFromJson() function will read the file from the filesystem. This is an I/O operation that will depend on the speed at which the file can be read. If the file is stored in a hard drive, the performance of the application will be worse than if the file is stored in an SSD, for example.
Many other operations, such as networking or receiving input from the peripherals of the computer, are also I/O operations. Algorithms that are I/O-bound will have performance bottleneck based on the I/O operations, and this means that optimizations are dependent on external systems or devices.
- HornetQ Messaging Developer’s Guide
- GeoServer Cookbook
- TestNG Beginner's Guide
- Getting Started with PowerShell
- JavaScript by Example
- Linux操作系統基礎案例教程
- 編程數學
- Extending Puppet(Second Edition)
- Windows Phone 8 Game Development
- Apache Solr PHP Integration
- 大學計算機應用基礎(Windows 7+Office 2010)(IC3)
- 金融商業數據分析:基于Python和SAS
- Java程序設計(項目教學版)
- Python編程:從入門到實踐(第2版)
- Learning VMware vCloud Air