![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#11
| |||
| |||
|
|
As calculation library ,use the C# may be not a good idea The c# which is fit for RAD ,especial in enterprise develop, but if you write a calculation library ,if would be become so slowly. |
#12
| |||
| |||
|
|
Frequent interop calls will reduce the overall speed of the native implementation. Thus .NET implementation might not look that slow after all. |
|
If you had few native calls that take a while the chance that native calls are faster would've been higher, but that is not your case. "barcel" <i99marda (AT) island (DOT) liu.se> wrote in message news:1164059091.127072.22660 (AT) m73g2000cwd (DOT) googlegroups.com... Thanks for the input. To shed some light on what is going on I can say that the c-function is doing calculations almost "all the time", i.e. it is called frequently. Every second or so... The amount of data differ, but perhaps on average there will be some five arrays of doubles with a length of 50-100 each. So I take it that the C# implementation is not significantly slower. That means it comes down to maintainability. Having two code bases is never good so I guess calling the C DLL will do. Or do you think of it differently? Of course I will do some performance tests as well... Cheers |
#13
| |||
| |||
|
|
Hi, I have a calculation library written in C compiled into a DLL. I now need to move into the .NET world and would like som advise on this. One option would be to keep the C-code in the current dll and call it directly from C#. This would require marshalling of some structs etc which could be done in a wrapper class in C#. |
|
The other option would be to convert all code into .NET and retire the DLL. This I could do, but I am worried that the .NET implementation won't be as fast as the C implementation, even taking the marshalling into account. |
|
Would be nice if somebody could do some consulting here.... thanks, |
#14
| |||
| |||
|
|
Hi, I have a calculation library written in C compiled into a DLL. I now need to move into the .NET world and would like som advise on this. One option would be to keep the C-code in the current dll and call it directly from C#. This would require marshalling of some structs etc which could be done in a wrapper class in C#. The other option would be to convert all code into .NET and retire the DLL. This I could do, but I am worried that the .NET implementation won't be as fast as the C implementation, even taking the marshalling into account. Would be nice if somebody could do some consulting here.... thanks, |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |