SlideShare a Scribd company logo
NDC { London }
2019
David Wengier
Microsoft
@davidwengier
@davidwengier
- Donald Knuth
@davidwengier
- Donald Knuth
@davidwengier
We should forget about small efficiencies, say about
97% of the time: premature optimization is the root
of all evil. Yet we should not pass up our opportunities
in that critical 3%
- Donald Knuth
@davidwengier
We should forget about small efficiencies, say about
97% of the time: premature optimization is the root
of all evil. Yet we should not pass up our opportunities
in that critical 3%”
- Donald Knuth
“Structured Programming with Go To Statements”, 1974@davidwengier
@davidwengier
@davidwengier
@davidwengier
“Don’t do that, that’s slow, and uses too much memory!”
@davidwengier
public static void Profile(Action func)
{
DateTime start = DateTime.Now;
for (int i = 0; i < 100; i++)
{
func();
}
Console.WriteLine(“Avg Time Elapsed {0} ms", (DateTime.Now - start).TotalMilliseconds / 100);
}
public static void Profile(Action func)
{
Process.GetCurrentProcess().PriorityClass = ProcessPriorityClass.High;
Thread.CurrentThread.Priority = ThreadPriority.Highest;
func();
Stopwatch watch = new Stopwatch();
GC.Collect();
GC.WaitForPendingFinalizers();
GC.Collect();
watch.Start();
for (int i = 0; i < 100; i++)
{
func();
}
watch.Stop();
Console.WriteLine(“Avg Time Elapsed {0} ms", watch.Elapsed.TotalMilliseconds / 100);
}
https://benchmarkdotnet.org/
https://github.com/dotnet/BenchmarkDotNet
•
•
•
•
@davidwengier
•
•
•
•
•
•
@davidwengier
•
•
@davidwengier
•
•
•
•
•
•
•
•
•
@davidwengier
0 bytes allocated 32 bytes allocated
•
•
@davidwengier
0 bytes 20 bytes 32 bytes
•
•
@davidwengier
•
•
@davidwengier
public class HybridDictionary: IDictionary {
// These numbers have been carefully tested to be optimal.
// Please don't change them without doing thorough performance
// testing.
private const int CutoverPoint = 9;
• Should you always use Dictionary<K,V> instead of IDictionary<K,V>?
• Should you always use structs instead of classes?
• Should you always use for instead of foreach?
• Should you always use StringBuilder instead of concatenation?
• Should you always use traditional loops instead of Linq?
• Should you always avoid throwing exceptions?
@davidwengier
• Should you always use Dictionary<K,V> instead of IDictionary<K,V>? No, it depends.
• Should you always use structs instead of classes? No, it depends.
• Should you always use for instead of foreach? No, it depends.
• Should you always use StringBuilder instead of concatenation? No, it depends.
• Should you always use traditional loops instead of Linq? No, it depends.
• Should you always avoid throwing exceptions? No, it depends.
• Should you always … anything? No, it probably depends.
@davidwengier
@davidwengier

More Related Content

Similar to Pragmatic Performance from NDC London 2019

What is "Domain Driven Design" and what can you expect from it?
What is "Domain Driven Design" and what can you expect from it?What is "Domain Driven Design" and what can you expect from it?
What is "Domain Driven Design" and what can you expect from it?
Tom Janssens
 
Performance and Benchmarking
Performance and BenchmarkingPerformance and Benchmarking
Performance and Benchmarking
David Wengier
 
11 Amazing things I Learnt At Word Camp Sydney 2014
11 Amazing things I Learnt At Word Camp Sydney 201411 Amazing things I Learnt At Word Camp Sydney 2014
11 Amazing things I Learnt At Word Camp Sydney 2014
WordPressBrisbane
 
Marie Astrid Molina (Scaleway), How to Design for a Product You Understand No...
Marie Astrid Molina (Scaleway), How to Design for a Product You Understand No...Marie Astrid Molina (Scaleway), How to Design for a Product You Understand No...
Marie Astrid Molina (Scaleway), How to Design for a Product You Understand No...
Techsylvania
 
Agile is a 4 letter word - dev nexus 2020
Agile is a 4 letter word - dev nexus 2020Agile is a 4 letter word - dev nexus 2020
Agile is a 4 letter word - dev nexus 2020
Jen Krieger
 
TDD on android. Why and How? (Coding Serbia 2019)
TDD on android. Why and How? (Coding Serbia 2019)TDD on android. Why and How? (Coding Serbia 2019)
TDD on android. Why and How? (Coding Serbia 2019)
Danny Preussler
 
Grails Worst Practices
Grails Worst PracticesGrails Worst Practices
Grails Worst Practices
Burt Beckwith
 
Dances with unicorns
Dances with unicornsDances with unicorns
Dances with unicorns
EspritAgile
 
Asynchronous single page applications without a line of HTML or Javascript, o...
Asynchronous single page applications without a line of HTML or Javascript, o...Asynchronous single page applications without a line of HTML or Javascript, o...
Asynchronous single page applications without a line of HTML or Javascript, o...
Robert Schadek
 
Global Day of Coderetreat'14 - Istanbul Event
Global Day of Coderetreat'14 - Istanbul EventGlobal Day of Coderetreat'14 - Istanbul Event
Global Day of Coderetreat'14 - Istanbul Event
Lemi Orhan Ergin
 
Intro to Drush
Intro to DrushIntro to Drush
Intro to Drush
Four Kitchens
 
Practical DMD Scripting
Practical DMD Scripting Practical DMD Scripting
Practical DMD Scripting
Zenoss
 
Designing Testable Software
Designing Testable SoftwareDesigning Testable Software
Designing Testable Software
Omegapoint Academy
 
FluentMigrator - Dayton .NET - July 2023
FluentMigrator - Dayton .NET - July 2023FluentMigrator - Dayton .NET - July 2023
FluentMigrator - Dayton .NET - July 2023
Matthew Groves
 
Design patterns - The Good, the Bad, and the Anti-Pattern
Design patterns -  The Good, the Bad, and the Anti-PatternDesign patterns -  The Good, the Bad, and the Anti-Pattern
Design patterns - The Good, the Bad, and the Anti-Pattern
Barry O Sullivan
 
Continuous Integration, the minimum viable product
Continuous Integration, the minimum viable productContinuous Integration, the minimum viable product
Continuous Integration, the minimum viable product
Julian Simpson
 
Object-oriented design principles
Object-oriented design principlesObject-oriented design principles
Object-oriented design principles
Xiaoyan Chen
 
Test Driven Development: More Development Than Ever
Test Driven Development: More Development Than EverTest Driven Development: More Development Than Ever
Test Driven Development: More Development Than Ever
Kiryl Baranoshnik
 
DataStax: How to Roll Cassandra into Production Without Losing your Health, M...
DataStax: How to Roll Cassandra into Production Without Losing your Health, M...DataStax: How to Roll Cassandra into Production Without Losing your Health, M...
DataStax: How to Roll Cassandra into Production Without Losing your Health, M...
DataStax Academy
 
Fantastic Elastic
Fantastic ElasticFantastic Elastic
Fantastic Elastic
Uwe Friedrichsen
 

Similar to Pragmatic Performance from NDC London 2019 (20)

What is "Domain Driven Design" and what can you expect from it?
What is "Domain Driven Design" and what can you expect from it?What is "Domain Driven Design" and what can you expect from it?
What is "Domain Driven Design" and what can you expect from it?
 
Performance and Benchmarking
Performance and BenchmarkingPerformance and Benchmarking
Performance and Benchmarking
 
11 Amazing things I Learnt At Word Camp Sydney 2014
11 Amazing things I Learnt At Word Camp Sydney 201411 Amazing things I Learnt At Word Camp Sydney 2014
11 Amazing things I Learnt At Word Camp Sydney 2014
 
Marie Astrid Molina (Scaleway), How to Design for a Product You Understand No...
Marie Astrid Molina (Scaleway), How to Design for a Product You Understand No...Marie Astrid Molina (Scaleway), How to Design for a Product You Understand No...
Marie Astrid Molina (Scaleway), How to Design for a Product You Understand No...
 
Agile is a 4 letter word - dev nexus 2020
Agile is a 4 letter word - dev nexus 2020Agile is a 4 letter word - dev nexus 2020
Agile is a 4 letter word - dev nexus 2020
 
TDD on android. Why and How? (Coding Serbia 2019)
TDD on android. Why and How? (Coding Serbia 2019)TDD on android. Why and How? (Coding Serbia 2019)
TDD on android. Why and How? (Coding Serbia 2019)
 
Grails Worst Practices
Grails Worst PracticesGrails Worst Practices
Grails Worst Practices
 
Dances with unicorns
Dances with unicornsDances with unicorns
Dances with unicorns
 
Asynchronous single page applications without a line of HTML or Javascript, o...
Asynchronous single page applications without a line of HTML or Javascript, o...Asynchronous single page applications without a line of HTML or Javascript, o...
Asynchronous single page applications without a line of HTML or Javascript, o...
 
Global Day of Coderetreat'14 - Istanbul Event
Global Day of Coderetreat'14 - Istanbul EventGlobal Day of Coderetreat'14 - Istanbul Event
Global Day of Coderetreat'14 - Istanbul Event
 
Intro to Drush
Intro to DrushIntro to Drush
Intro to Drush
 
Practical DMD Scripting
Practical DMD Scripting Practical DMD Scripting
Practical DMD Scripting
 
Designing Testable Software
Designing Testable SoftwareDesigning Testable Software
Designing Testable Software
 
FluentMigrator - Dayton .NET - July 2023
FluentMigrator - Dayton .NET - July 2023FluentMigrator - Dayton .NET - July 2023
FluentMigrator - Dayton .NET - July 2023
 
Design patterns - The Good, the Bad, and the Anti-Pattern
Design patterns -  The Good, the Bad, and the Anti-PatternDesign patterns -  The Good, the Bad, and the Anti-Pattern
Design patterns - The Good, the Bad, and the Anti-Pattern
 
Continuous Integration, the minimum viable product
Continuous Integration, the minimum viable productContinuous Integration, the minimum viable product
Continuous Integration, the minimum viable product
 
Object-oriented design principles
Object-oriented design principlesObject-oriented design principles
Object-oriented design principles
 
Test Driven Development: More Development Than Ever
Test Driven Development: More Development Than EverTest Driven Development: More Development Than Ever
Test Driven Development: More Development Than Ever
 
DataStax: How to Roll Cassandra into Production Without Losing your Health, M...
DataStax: How to Roll Cassandra into Production Without Losing your Health, M...DataStax: How to Roll Cassandra into Production Without Losing your Health, M...
DataStax: How to Roll Cassandra into Production Without Losing your Health, M...
 
Fantastic Elastic
Fantastic ElasticFantastic Elastic
Fantastic Elastic
 

Recently uploaded

14 th Edition of International conference on computer vision
14 th Edition of International conference on computer vision14 th Edition of International conference on computer vision
14 th Edition of International conference on computer vision
ShulagnaSarkar2
 
Alluxio Webinar | 10x Faster Trino Queries on Your Data Platform
Alluxio Webinar | 10x Faster Trino Queries on Your Data PlatformAlluxio Webinar | 10x Faster Trino Queries on Your Data Platform
Alluxio Webinar | 10x Faster Trino Queries on Your Data Platform
Alluxio, Inc.
 
Unveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdfUnveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdf
brainerhub1
 
DevOps Consulting Company | Hire DevOps Services
DevOps Consulting Company | Hire DevOps ServicesDevOps Consulting Company | Hire DevOps Services
DevOps Consulting Company | Hire DevOps Services
seospiralmantra
 
The Rising Future of CPaaS in the Middle East 2024
The Rising Future of CPaaS in the Middle East 2024The Rising Future of CPaaS in the Middle East 2024
The Rising Future of CPaaS in the Middle East 2024
Yara Milbes
 
WMF 2024 - Unlocking the Future of Data Powering Next-Gen AI with Vector Data...
WMF 2024 - Unlocking the Future of Data Powering Next-Gen AI with Vector Data...WMF 2024 - Unlocking the Future of Data Powering Next-Gen AI with Vector Data...
WMF 2024 - Unlocking the Future of Data Powering Next-Gen AI with Vector Data...
Luigi Fugaro
 
一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理
dakas1
 
一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理
一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理
一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理
kgyxske
 
Assure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyesAssure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
Photoshop Tutorial for Beginners (2024 Edition)
Photoshop Tutorial for Beginners (2024 Edition)Photoshop Tutorial for Beginners (2024 Edition)
Photoshop Tutorial for Beginners (2024 Edition)
alowpalsadig
 
Superpower Your Apache Kafka Applications Development with Complementary Open...
Superpower Your Apache Kafka Applications Development with Complementary Open...Superpower Your Apache Kafka Applications Development with Complementary Open...
Superpower Your Apache Kafka Applications Development with Complementary Open...
Paul Brebner
 
美洲杯赔率投注网【​网址​🎉3977·EE​🎉】
美洲杯赔率投注网【​网址​🎉3977·EE​🎉】美洲杯赔率投注网【​网址​🎉3977·EE​🎉】
美洲杯赔率投注网【​网址​🎉3977·EE​🎉】
widenerjobeyrl638
 
Enhanced Screen Flows UI/UX using SLDS with Tom Kitt
Enhanced Screen Flows UI/UX using SLDS with Tom KittEnhanced Screen Flows UI/UX using SLDS with Tom Kitt
Enhanced Screen Flows UI/UX using SLDS with Tom Kitt
Peter Caitens
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
Drona Infotech
 
How Can Hiring A Mobile App Development Company Help Your Business Grow?
How Can Hiring A Mobile App Development Company Help Your Business Grow?How Can Hiring A Mobile App Development Company Help Your Business Grow?
How Can Hiring A Mobile App Development Company Help Your Business Grow?
ToXSL Technologies
 
Manyata Tech Park Bangalore_ Infrastructure, Facilities and More
Manyata Tech Park Bangalore_ Infrastructure, Facilities and MoreManyata Tech Park Bangalore_ Infrastructure, Facilities and More
Manyata Tech Park Bangalore_ Infrastructure, Facilities and More
narinav14
 
Baha Majid WCA4Z IBM Z Customer Council Boston June 2024.pdf
Baha Majid WCA4Z IBM Z Customer Council Boston June 2024.pdfBaha Majid WCA4Z IBM Z Customer Council Boston June 2024.pdf
Baha Majid WCA4Z IBM Z Customer Council Boston June 2024.pdf
Baha Majid
 
🏎️Tech Transformation: DevOps Insights from the Experts 👩‍💻
🏎️Tech Transformation: DevOps Insights from the Experts 👩‍💻🏎️Tech Transformation: DevOps Insights from the Experts 👩‍💻
🏎️Tech Transformation: DevOps Insights from the Experts 👩‍💻
campbellclarkson
 
Migration From CH 1.0 to CH 2.0 and Mule 4.6 & Java 17 Upgrade.pptx
Migration From CH 1.0 to CH 2.0 and  Mule 4.6 & Java 17 Upgrade.pptxMigration From CH 1.0 to CH 2.0 and  Mule 4.6 & Java 17 Upgrade.pptx
Migration From CH 1.0 to CH 2.0 and Mule 4.6 & Java 17 Upgrade.pptx
ervikas4
 
Transforming Product Development using OnePlan To Boost Efficiency and Innova...
Transforming Product Development using OnePlan To Boost Efficiency and Innova...Transforming Product Development using OnePlan To Boost Efficiency and Innova...
Transforming Product Development using OnePlan To Boost Efficiency and Innova...
OnePlan Solutions
 

Recently uploaded (20)

14 th Edition of International conference on computer vision
14 th Edition of International conference on computer vision14 th Edition of International conference on computer vision
14 th Edition of International conference on computer vision
 
Alluxio Webinar | 10x Faster Trino Queries on Your Data Platform
Alluxio Webinar | 10x Faster Trino Queries on Your Data PlatformAlluxio Webinar | 10x Faster Trino Queries on Your Data Platform
Alluxio Webinar | 10x Faster Trino Queries on Your Data Platform
 
Unveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdfUnveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdf
 
DevOps Consulting Company | Hire DevOps Services
DevOps Consulting Company | Hire DevOps ServicesDevOps Consulting Company | Hire DevOps Services
DevOps Consulting Company | Hire DevOps Services
 
The Rising Future of CPaaS in the Middle East 2024
The Rising Future of CPaaS in the Middle East 2024The Rising Future of CPaaS in the Middle East 2024
The Rising Future of CPaaS in the Middle East 2024
 
WMF 2024 - Unlocking the Future of Data Powering Next-Gen AI with Vector Data...
WMF 2024 - Unlocking the Future of Data Powering Next-Gen AI with Vector Data...WMF 2024 - Unlocking the Future of Data Powering Next-Gen AI with Vector Data...
WMF 2024 - Unlocking the Future of Data Powering Next-Gen AI with Vector Data...
 
一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理
 
一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理
一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理
一比一原版(sdsu毕业证书)圣地亚哥州立大学毕业证如何办理
 
Assure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyesAssure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyes
 
Photoshop Tutorial for Beginners (2024 Edition)
Photoshop Tutorial for Beginners (2024 Edition)Photoshop Tutorial for Beginners (2024 Edition)
Photoshop Tutorial for Beginners (2024 Edition)
 
Superpower Your Apache Kafka Applications Development with Complementary Open...
Superpower Your Apache Kafka Applications Development with Complementary Open...Superpower Your Apache Kafka Applications Development with Complementary Open...
Superpower Your Apache Kafka Applications Development with Complementary Open...
 
美洲杯赔率投注网【​网址​🎉3977·EE​🎉】
美洲杯赔率投注网【​网址​🎉3977·EE​🎉】美洲杯赔率投注网【​网址​🎉3977·EE​🎉】
美洲杯赔率投注网【​网址​🎉3977·EE​🎉】
 
Enhanced Screen Flows UI/UX using SLDS with Tom Kitt
Enhanced Screen Flows UI/UX using SLDS with Tom KittEnhanced Screen Flows UI/UX using SLDS with Tom Kitt
Enhanced Screen Flows UI/UX using SLDS with Tom Kitt
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
 
How Can Hiring A Mobile App Development Company Help Your Business Grow?
How Can Hiring A Mobile App Development Company Help Your Business Grow?How Can Hiring A Mobile App Development Company Help Your Business Grow?
How Can Hiring A Mobile App Development Company Help Your Business Grow?
 
Manyata Tech Park Bangalore_ Infrastructure, Facilities and More
Manyata Tech Park Bangalore_ Infrastructure, Facilities and MoreManyata Tech Park Bangalore_ Infrastructure, Facilities and More
Manyata Tech Park Bangalore_ Infrastructure, Facilities and More
 
Baha Majid WCA4Z IBM Z Customer Council Boston June 2024.pdf
Baha Majid WCA4Z IBM Z Customer Council Boston June 2024.pdfBaha Majid WCA4Z IBM Z Customer Council Boston June 2024.pdf
Baha Majid WCA4Z IBM Z Customer Council Boston June 2024.pdf
 
🏎️Tech Transformation: DevOps Insights from the Experts 👩‍💻
🏎️Tech Transformation: DevOps Insights from the Experts 👩‍💻🏎️Tech Transformation: DevOps Insights from the Experts 👩‍💻
🏎️Tech Transformation: DevOps Insights from the Experts 👩‍💻
 
Migration From CH 1.0 to CH 2.0 and Mule 4.6 & Java 17 Upgrade.pptx
Migration From CH 1.0 to CH 2.0 and  Mule 4.6 & Java 17 Upgrade.pptxMigration From CH 1.0 to CH 2.0 and  Mule 4.6 & Java 17 Upgrade.pptx
Migration From CH 1.0 to CH 2.0 and Mule 4.6 & Java 17 Upgrade.pptx
 
Transforming Product Development using OnePlan To Boost Efficiency and Innova...
Transforming Product Development using OnePlan To Boost Efficiency and Innova...Transforming Product Development using OnePlan To Boost Efficiency and Innova...
Transforming Product Development using OnePlan To Boost Efficiency and Innova...
 

Pragmatic Performance from NDC London 2019

Editor's Notes

  1. Whos heard this? This gets carted out on PRs, and usually as a negative. Either someone changes a linq statement to foreach statement, and someone else says “don’t bother, premature opt…”. Or someone writes a linq statement, someone comments saying it should be a foreach statement, and then in order to be lazy, “premature opt..” But first, Who said it?
  2. Donald Knuth. K-nooth. You may notice the formatting is odd.. Well, that’s because its part of a bigger quote
  3. Most people don’t know this. 97% of the time its evil, the rest its not. But why? Notice the quotes.
  4. Consider maintenance and debugging. Readability. Etc. Bonus points, what paper was it from?
  5. Ironically, a quote that lots of developers spout as being gospel comes from a paper arguing that programming with go to statements is perfectly fine. A debate for another time.
  6. How much? How often?
  7. Questions assumptions: “the compiler will fix this”. Will it? Release builds only!
  8. Measure. Before and After.
  9. DateTime is as precise as stopwatch, but not as granular Doesn’t account for JITing
  10. High affinity, so nothing else on the machine matters (hopefully) JIT first Get GC out of the way, because GC pauses are bad for benchmarking Then go
  11. Or use BenchmarkDotNet
  12. So I’ve told you how to benchmark, and that you should basically never do it, so lets do it.
  13. Except its too slow. Its _thorough_ BenchmarkDotNet is too awesome for live demos. I have some canned ones.
  14. Concat wins Then stringbuilder StringBuilder again Now StringBuilder with capacity, and that trend continues forever If we add more, we can see stringbuilder and string join are both a lot fast As we keep going, the difference gets bigger Looks like a slam dunk right? Always use a string builder with capacity? BUT- don’t forget context!!! Look what happens as the strings get longer. Now it doesn’t matter so much, as long as you don’t concatenate
  15. Back to context, again production code.. For 3 small strings, concatenation is slower, but not measurably so. But it uses less memory. The overhead of StringBuilder might make it a winner. For large strings, not so. Stopwatch granularity is around 300ns, so the difference in the first one is effectively unmeasurable in production .NET code. For large strings SB still uses heaps of memory. Are strings the best thing to use at all? Step back
  16. The overhead of a class vs struct, virtual calls, etc. makes the difference. So if you use Idictionary as your parameters are you’re supposed to do, on a hot path that might be a negative. Question assumptions.. How many of you think “coding to interfaces” is _always_ better?
  17. I’m an old man so I like loops, but Linq has an overhead.
  18. Overhead in method invocations and allocations. Even the Where vs FirstOrDefault examples, because there are more iterators being allocated. Where uses an iterator, FirstOrDefault uses a foreach loop
  19. 50% chance of having an invalid number. The important thing is that both benchmarks will use exactly the same input.
  20. Question assumptions!
  21. Culture of performance means measure, not necessarily write complicated code
  22. Pragmatic. Every decision is unique. Don’t write off performance, but don’t write off anything.