# Performance difference in Asp.Net with IronRuby

**URL:** <https://www.ruby-forum.com/t/performance-difference-in-asp-net-with-ironruby/139250>\
**Category:** IronRuby\
**Created:** [June 2, 2008, 9:39am UTC](https://www.ruby-forum.com/t/performance-difference-in-asp-net-with-ironruby/139250 "2008-06-02T09:39:06Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![rahil](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/ebca7d/32.png) [@rahil](https://www.ruby-forum.com/u/rahil)\
**Post date:** [June 2, 2008, 9:39am UTC](https://www.ruby-forum.com/t/performance-difference-in-asp-net-with-ironruby/139250/1 "2008-06-02T09:39:06Z")

</div>

Hi,

Will there be any significant difference between [Asp.Net](http://Asp.Net) with C# and  
IronRuby.?

Since i have ready many blogs claiming C# to be running faster than  
[Vb.Net](http://Vb.Net), i just wanted to reconfirm that will IronRuby at par with C# or  
[Vb.Net](http://Vb.Net).

I am more confused about performance since C# runs directly on CLR  
and…  
IronRuby runs on DLR, which itself runs above CLR.

Let me make more clear.

## C#

Runs on DLR ---------Only one layer.

## IronRuby

## DLR

CLR --------------Two layers.

Sorry for my newbie question.

This question applies to IronRuby final RTM

Thanks

---

<div class="post-metadata">

**Author:** ![rahil](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/ebca7d/32.png) [@rahil](https://www.ruby-forum.com/u/rahil)\
**Post date:** [June 2, 2008, 10:21am UTC](https://www.ruby-forum.com/t/performance-difference-in-asp-net-with-ironruby/139250/2 "2008-06-02T10:21:40Z")

</div>

On Mon, Jun 2, 2008 at 12:39 AM, Rahil K. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> Will there be any significant difference between [Asp.Net](http://Asp.Net) with C# and  
> IronRuby.?
> 
> Since i have ready many blogs claiming C# to be running faster than  
> [Vb.Net](http://Vb.Net), i just wanted to reconfirm that will IronRuby at par with C# or  
> [Vb.Net](http://Vb.Net).

This question pre-supposes that the speed of the language is the most  
important factor in the performance of a web-site, an assertion I  
believe to  
be contrary to most evidence and experience.

---

<div class="post-metadata">

**Author:** ![rahil](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/ebca7d/32.png) [@rahil](https://www.ruby-forum.com/u/rahil)\
**Post date:** [June 2, 2008, 7:25pm UTC](https://www.ruby-forum.com/t/performance-difference-in-asp-net-with-ironruby/139250/3 "2008-06-02T19:25:38Z")

</div>

It was true, early in .NET, that the C# compiler was a more aggressive  
optimizer than the [VB.net](http://VB.net) compiler. Not sure if it’s still true or not.

---

<div class="post-metadata">

**Author:** ![rahil](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/ebca7d/32.png) [@rahil](https://www.ruby-forum.com/u/rahil)\
**Post date:** [June 2, 2008, 7:32pm UTC](https://www.ruby-forum.com/t/performance-difference-in-asp-net-with-ironruby/139250/4 "2008-06-02T19:32:42Z")

</div>

Ah. Didnâ€™t know that.

Thanks!

JD

From: removed\_email\_address@domain.invalid  
[[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)] On Behalf Of Brad W.  
Sent: Monday, June 02, 2008 10:25 AM  
To: removed\_email\_address@domain.invalid  
Subject: Re: [Ironruby-core] Performance difference in [Asp.Net](http://Asp.Net) with  
IronRuby.

It was true, early in .NET, that the C# compiler was a more aggressive  
optimizer than the [VB.net](http://VB.net) compiler. Not sure if it’s still true or not.  
On Mon, Jun 2, 2008 at 10:10 AM, Jim D.  
\<removed\_email\_address@domain.invalid[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)\> wrote:

Sidenote: Can anyone give some links on those blogs (VB vs C#) they are  
both compiled to IL, so I don’t see why one would be faster, just  
curious.

---

<div class="post-metadata">

**Author:** ![rahil](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/ebca7d/32.png) [@rahil](https://www.ruby-forum.com/u/rahil)\
**Post date:** [June 2, 2008, 8:22pm UTC](https://www.ruby-forum.com/t/performance-difference-in-asp-net-with-ironruby/139250/5 "2008-06-02T20:22:47Z")

</div>

I’ve seen a couple suggestions on blogs that suggested C# was faster  
than  
[VB.NET](http://VB.NET), but when it came down to testing, either the code wasn’t  
directly  
equivalent or the performance difference was fairly negligible.

If someone has something to suggest otherwise, I’d be interested in that  
too.

---

<div class="post-metadata">

**Author:** ![rahil](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/ebca7d/32.png) [@rahil](https://www.ruby-forum.com/u/rahil)\
**Post date:** [June 2, 2008, 7:12pm UTC](https://www.ruby-forum.com/t/performance-difference-in-asp-net-with-ironruby/139250/6 "2008-06-02T19:12:07Z")

</div>

Agreed, unless you are running high performance computing applications,  
like number crunching, your code will probably be slowed down by I/O,  
Database or other external factors. As far as performance, it isnâ€™t a  
major concern for us yet. We are more focused on being compatible with  
RubySpec and CRuby. We will be involved in the Ruby Benchmark Suite  
project  
([Let's create a Ruby Benchmark Suite | Programming Zen](http://antoniocangiano.com/2008/06/01/help-me-create-the-ruby-benchmark-suite/)),  
and will focus on those benchmarks when the time comes. Iâ€™d say a better  
comparison would be â€œwill we be at par with JRuby or CRubyâ€ and we hope  
to be on par with JRuby eventually.

Sidenote: Can anyone give some links on those blogs (VB vs C#) they are  
both compiled to IL, so I donâ€™t see why one would be faster, just  
curious.

JD

From: removed\_email\_address@domain.invalid  
[[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)] On Behalf Of Brad W.  
Sent: Monday, June 02, 2008 1:20 AM  
To: removed\_email\_address@domain.invalid  
Subject: Re: [Ironruby-core] Performance difference in [Asp.Net](http://Asp.Net) with  
IronRuby.

On Mon, Jun 2, 2008 at 12:39 AM, Rahil K.  
\<removed\_email\_address@domain.invalid[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)\> wrote:  
Will there be any significant difference between [Asp.Net](http://Asp.Net) with C# and  
IronRuby.?

Since i have ready many blogs claiming C# to be running faster than  
[Vb.Net](http://Vb.Net), i just wanted to reconfirm that will IronRuby at par with C# or  
[Vb.Net](http://Vb.Net).

This question pre-supposes that the speed of the language is the most  
important factor in the performance of a web-site, an assertion I  
believe to be contrary to most evidence and experience.

---

<div class="post-metadata">

**Author:** ![rahil](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/ebca7d/32.png) [@rahil](https://www.ruby-forum.com/u/rahil)\
**Post date:** [June 2, 2008, 10:45pm UTC](https://www.ruby-forum.com/t/performance-difference-in-asp-net-with-ironruby/139250/7 "2008-06-02T22:45:33Z")

</div>

Rahil K.:

> Will there be any significant difference between [Asp.Net](http://Asp.Net) with C# and  
> IronRuby.?
> 
> Since i have ready many blogs claiming C# to be running faster than  
> [Vb.Net](http://Vb.Net), i just wanted to reconfirm that will IronRuby at par with C# or  
> [Vb.Net](http://Vb.Net).

For pure computational speed, VB and C# are equivalent to each other and  
will be much faster than IronRuby.

Whether you see the performance difference in real code will depend on  
where the bottleneck in your application is. For web application, it is  
highly unlikely that your app’s perceived performance will bottleneck in  
the code that renders HTML. It is far more likely the case that you’ll  
bottleneck on your database or some other shared resource.

Thanks,  
-John
