Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is the goto statement slow in c#?

Tags:

c#

goto

I'm working on a C# .NET application that uses some rather complex scientific formulas on large sets of data (10 million data points on average). Part of what I am doing requires optimizing the formula implementations as best as possible.

I noticed that one formula implementation uses goto, and that made me wonder: is goto slower than other flow control constructs?

like image 627
kevin628 Avatar asked Apr 19 '12 17:04

kevin628


1 Answers

is goto slower than other flow control constructs?

No. All the other flow control constructs are basically goto anyway.

like image 103
jason Avatar answered Oct 23 '22 06:10

jason