TypeScript - Errors as Values vs Exceptions Performance Benchmarks

28/05/2025 10 min
TypeScript - Errors as Values vs Exceptions Performance Benchmarks

Listen "TypeScript - Errors as Values vs Exceptions Performance Benchmarks"

Episode Synopsis

In this video we explore when to use exceptions vs errors as values and how they compare performance wise.Original blog post with all links and code: https://hamy.xyz/blog/2025-05_typescript-errors-vs-exceptions-benchmarksChapters00:00 - Intro03:35 - Benchmarking errors as values vs exceptions05:15 - Errors vs Exceptions results07:25 - Errors vs Exceptions Benchmark Code08:15 - When to use Exceptions vs Error ValuesLinks:- Types vs No Types - How Types Allow Code to Scale across Developers, Organizations, and Code Size - https://www.youtube.com/watch?v=ntNGPompHsA&ab_channel=HAMYLABS- My 2025 Programming Language Tier List - https://www.youtube.com/watch?v=yEIvl2Nuneg&ab_channel=HAMYLABS- Build a Simple Result type in Python - and why you should use them - https://www.youtube.com/watch?v=1P7J2wI46sg&ab_channel=HAMYLABSAbout me: I'm Hamilton - a Technomancer building Simple Scalable Systems.Connect with me:- Website: https://hamy.xyz- Email List: https://hamniverse.substack.com/- Twitter: @SIRHAMY - https://twitter.com/SIRHAMY- BlueSky: https://bsky.app/profile/sirhamy.bsky.social- Pod Cast: HAMY LABS POD - https://hamylabspod.buzzsprout.com/# Support If you liked this and would like to see more, consider becoming a supporter: https://hamy.xyz/labs/haminionsSupporters get:* Full source code access from courses / tutorials* Exclusive discounts on products / coursesPlus you help me to keep experimenting / sharing!For Sponsorship info: https://hamy.xyz/labs/sponsors