“Маркетолог спрашивает программиста: в чём сложность поддержки большого проекта?
Программист: ну представь, что ты писатель и поддерживаешь проект “Война и мир”. У тебя ТЗ — написать главу как Наташа Ростова гуляла под дождём по парку. Ты пишешь “шёл дождь”, сохраняешь, вылетает сообщение об ошибке “Наташа Ростова умерла, продолжение невозможно”. Почему умерла? Начинаешь разбираться. Выясняется, что у Пьера Безухова скользкие туфли, он упал, его пистолет ударился о землю и выстрелил в столб, а пуля от столба срикошетила в Наташу. Что делать? Зарядить пистолет холостыми? Поменять туфли? Решили убрать столб. Получаем сообщение “Поручик Ржевский умер.” Выясняется, что он в следующей главе облокачивается о столб, которого уже нет..”
Aug 19, 2015
Jun 22, 2015
Jun 8, 2015
Parallel Programming
Amdahl's law
The speedup of a program using multiple processors in parallel computing is limited by the time needed for the sequential fraction of the program. For example, if a program needs 20 hours using a single processor core, and a particular portion of the program which takes one hour to execute cannot be parallelized, while the remaining 19 hours (95%) of execution time can be parallelized, then regardless of how many processors are devoted to a parallelized execution of this program, the minimum execution time cannot be less than that critical one hour. Hence the speedup is limited to at most 20×.
Gustafson–Barsis' law
Says that computations involving arbitrarily large data sets can be efficiently parallelized.
The speedup of a program using multiple processors in parallel computing is limited by the time needed for the sequential fraction of the program. For example, if a program needs 20 hours using a single processor core, and a particular portion of the program which takes one hour to execute cannot be parallelized, while the remaining 19 hours (95%) of execution time can be parallelized, then regardless of how many processors are devoted to a parallelized execution of this program, the minimum execution time cannot be less than that critical one hour. Hence the speedup is limited to at most 20×.
Gustafson–Barsis' law
Says that computations involving arbitrarily large data sets can be efficiently parallelized.
Labels:
design patterns,
laws,
parallel programming,
principles
Jun 2, 2015
May 21, 2015
May 13, 2015
May 5, 2015
У скольких целых чисел, лежащих в диапазоне от 1 до 1000, есть цифра 3?
Сначала узнаем, сколько чисел не имеют 3 в своей записи. Для этого на каждое место ставим 9 цифр, не включающие 3 т.е. 9 * 9 * 9 = 729. Если всего чисел 1000, то ответ 1000 – 729 = 271.
http://tproger.ru/problems/count-digit-3-in-numbers-from-1-to-1000/
Labels:
combinatorics,
math
Apr 29, 2015
JIT
JIT in Python via LLVM
http://eli.thegreenplace.net/2015/building-and-using-llvmlite-a-basic-example/
http://eli.thegreenplace.net/2012/08/10/building-and-using-llvmpy-a-basic-example
http://nullprogram.com/blog/2015/03/19/ A Basic Just-In-Time Compiler
http://www.tedunangst.com/flak/post/now-or-never-exec how to add PROT_EXEC on mmap
http://eli.thegreenplace.net/2015/building-and-using-llvmlite-a-basic-example/
http://eli.thegreenplace.net/2012/08/10/building-and-using-llvmpy-a-basic-example
http://nullprogram.com/blog/2015/03/19/ A Basic Just-In-Time Compiler
http://www.tedunangst.com/flak/post/now-or-never-exec how to add PROT_EXEC on mmap
Labels:
jit
Subscribe to:
Posts (Atom)





