# A rewrite needs a measurable business return

Markdown copy of https://realalpha.app/s/a-rewrite-needs-a-measurable-business-return/ on Real Alpha, the best minutes from long interviews with the people building AI. Cite and link the page, not this copy.

- Speaker: [Stephen Toub](https://realalpha.app/people/stephen-toub/) · Stephen Toub is a Distinguished Engineer at Microsoft.
- Host: [Ryan Peterman](https://realalpha.app/people/ryan-peterman/) · Host, The Peterman Pod · Went from new grad to staff engineer at Instagram in three years.
- Show: The Peterman Pod
- Episode: [Microsoft Distinguished Eng: Why And How To Port Your Entire Codebase to Rust | Stephen Toub](https://realalpha.app/v/PLMOVlZC4eU/), Nov 2, 2026
- Moment: 1:03:24 to 1:06:47 of the episode (3 min), playing on https://realalpha.app/s/a-rewrite-needs-a-measurable-business-return/; the episode from there: https://realalpha.app/v/PLMOVlZC4eU/?t=3804

## Quote

> “if i invest two weeks in making these changes to the .NET Regex engine, and it makes the patterns that they're using **four times faster**”
> — [Stephen Toub](https://realalpha.app/people/stephen-toub/) at [1:06:00](https://realalpha.app/v/PLMOVlZC4eU/?t=3960) · The Peterman Pod

## Takeaways

1. Compare migration cost with the expected savings or performance gain.
2. He cites service savings as a reason to migrate to .NET Core.
3. A two-week regex change can be assessed against a fourfold speedup.

## About this segment

Stephen Toub says a rewrite needs a clear business return, not just a language preference. He weighs migration cost against savings, including a .NET regex change that could make patterns four times faster.

From “Microsoft Distinguished Eng: Why And How To Port Your Entire Codebase to Rust | Stephen Toub”, Nov 2, 2026. [Watch the full episode](https://realalpha.app/v/PLMOVlZC4eU/)

## Transcript

Transcribed by machine (Whisper) from the episode’s audio, so a word may be off here and there.

[1:03:30](https://realalpha.app/v/PLMOVlZC4eU/?t=3810) engineer out there on some team considering doing some sort of rewrite what criteria should they look for to decide if it's worth undertaking it or not it really comes down to what is the business value i mean there's there's the ones you can do for fun where it's your dime and you get to decide you know what fun is worth um just like you know i i really don't like going to casinos because I really don't like what I consider to be losing.

[1:04:00](https://realalpha.app/v/PLMOVlZC4eU/?t=3840) money, gambling, but friends of mine love it. And they consider it paying for a nice worth of entertainment. They're not losing money. They're paying for fun. Right. And so if you're, if you've got your own personal development project and you want to spend tokens on porting that to something else, great. Have fun. Like that sounds awesome. But the benefit, you need to understand what the benefits are. The benefits are your enjoyment. When it comes to a business, it's what is the business value that this is occurring to and then like anything else what is what is it going to cost uh and what is the return on that investment and that needs to be very clear and there are lots of these migration projects that are people all over the world and businesses all over the world are doing even before agents where they have done that cost assessment and they have

[1:04:51](https://realalpha.app/v/PLMOVlZC4eU/?t=3891) decided that the return on investment is very much worthwhile. I saw this a lot with .NET, with people moving from .NET framework to .NET core. And we invested a lot in making .NET core incredibly fast. And so there would be very real performance benefits that would come from doing that migration. And they could figure out the cost associated with, well, we're spending X millions of dollars running our services today and we would save three million dollars a year by moving you know by doing this port and this port is going to take a year and it's going to cost us a developer for that year so they do the math you know this is this is absolutely worthwhile um even at a more micro level not even for ports like what features do you invest in when i was spending a lot of my time working for example on the dotnet um regex engine uh you know

[1:05:54](https://realalpha.app/v/PLMOVlZC4eU/?t=3954) i i could look to see how much are we spending we as a company you know or how much is this particular service spending on running on regular expressions every year if i invest two weeks in making these changes to the .NET Regex engine, and it makes the patterns that they're using four times faster, what is the return on investment for my two weeks and how much they save as a service over the course of the year? These kinds of trade-offs are everywhere. And you just need to be very clear about why you're doing it, what it will cost, and what you get for it. And if you can write all that down and you can justify it, then it's a good project to do. If you can't justify it. It's very suspect. When I was doing research for this interview, I looked into your career.
