Excel 2003中的C#Multi-Thread dll速度慢 [英] C# Multi-Thread dll slow in Excel 2003

查看:161
本文介绍了Excel 2003中的C#Multi-Thread dll速度慢的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我使用多线程(一些简单的并行)在C#(。NET 4)中创建了一个dll。 for ..)


在Visual Studio 2010中完美运行,并且使用parallel的功能更快,因为非并行(至少快4倍)。


在excel中运行相同的功能(使dll COM可见...通过VBA)至少需要两倍于C#。



函数中只有4个参数,所以我猜这不是问题传递参数......


这是因为我使用excel2003而不是2007年?我错过了我应该做的事情


感谢您的帮助


Vincent


解决方案


我为迟到的回复道歉;我们正在调查这个问题,并会在几天内回复您。


谢谢,


Ankush


Hi,

I created a dll in C# (.NET 4) using multi-thread (Some simple parallel.for..)

Runs perfectly in Visual Studio 2010 and the function is quicker using parallel.for that with non parallel for (at least 4 times quicker).

Running the same function in excel (making the dll COM visible ...via VBA ) takes at least twice longer than in C#.

It's even slowier when I use the parallel.for than normal for!!

There are only 4 arguments in the function so I guess it's not an issue with passing the arguments...

Is that because i use excel2003 and not 2007? Am i missing something I should do

thanks for your help

Vincent

解决方案

Hi,

I apologize for a late reply; we are looking into the issue, and will get back to you in a couple of days.

Thanks,

Ankush


这篇关于Excel 2003中的C#Multi-Thread dll速度慢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆