- Learning Concurrency in Kotlin
- Miguel Angel Castiblanco Torres
- 68字
- 2021-08-05 10:46:42
Concurrency versus parallelism in CPU-bound algorithms
CPU-bound algorithms will benefit from parallelism but probably not from single-core concurrency. For example, the previous algorithm that takes a list of words and filters the palindromes could be modified so that a thread is created per each 1,000 words received. So, if isPalindrome() receives 3,000 words, the execution could be represented like this:

isPalindrome creating a thread per each 1,000 words
推薦閱讀
- HTML5+CSS3王者歸來
- Java多線程編程實戰(zhàn)指南:設計模式篇(第2版)
- 自制編譯器
- Python自動化運維快速入門
- Twilio Best Practices
- 數(shù)據(jù)結(jié)構(gòu)(Java語言描述)
- 機器人Python青少年編程開發(fā)實例
- Instant QlikView 11 Application Development
- Android Wear Projects
- 基于ARM Cortex-M4F內(nèi)核的MSP432 MCU開發(fā)實踐
- Java Web從入門到精通(第3版)
- Learning iOS Security
- 零基礎(chǔ)學Scratch 3.0編程
- Mastering Concurrency in Python
- Mastering OAuth 2.0