hardware like multiple CPU or GPU cores Concurrency: ways of structuring programs into independent activities that can communicate and synchronise with each other Parallelism ≠ Concurrency 8 Samstag, 30. März 13
= fibonacci(n-1) fib2 = fibonacci(n-2) fib1 + fib2 end def fibonacci(n) return n if n < 2 fib1 = Dispatch::Promise.new { fibonacci(n-1) } fib2 = Dispatch::Promise.new { fibonacci(n-2) } fib1 + fib2 end n = 100 Benchmark.bm do |x| x.report("Parallel") { n.times do ; fibonacci(10); end } x.report("Sequential") { n.times do ; fibonacci2(10);end } end 37 Samstag, 30. März 13
View creation • Drawing • Questionable algorithms • Questionable data structures • I/O • Blocking on information • Unnecessary work 40 Samstag, 30. März 13