|
I'm going to ask a dumb question:
If you're requiring performance only, why not go for C++ (or even inline C) ?
I don't see the benefit of doing IL manually.
Cheers,
Simon
"Every good work of software starts by scratching a developer's personal itch.", Eric S. Raymond
|
|
|
|
|
After disassembling the Managed C++ code, I realized that I can optimize it better than the compiler. However, the MC++ included some native code which can't be disassembled with ildasm so I can't compile it with ilasm. Besides, since the stuff is managed, it doesn't really matter what language I write in; I like C#.
|
|
|
|
|
I think it does. Only memmory is managed, but the Managed C++ code is more optimized that C#, actually I think is the only optimized language from .NET. Also with managed you can combine managed and unmanaged code so you can obtain native code for real time actions.
Best regards,
Alexandru Savescu
|
|
|
|
|
Could you direct me to where ms says mc++ is more optimized?
I cant seem to find reference to that.
|
|
|
|
|
The 2nd part is faster since dup doesn't need to be verified and it's considered type safe
Cheers,
Joao Vaz
The loved ones never really leave us , they are always alive on our hearts and minds.
|
|
|
|
|
And since you are interested in Il, check the Ecma-335 specificationthat deals with the Commom Language Infrastructure, in which IL instruction set belongs, here Common Language Infrastructure
Cheers,
Joao Vaz
The loved ones never really leave us , they are always alive on our hearts and minds.
|
|
|
|
|
I don't think there will be any observable difference between the two. I will really be surprised if your hand optimization gives you more speed than the unoptimized code.
I have never wasted time worrying about such insignificant things. Keep your eye upon the donut and NOT upon the hole. - Bill Sergio about posting in the right forum. The Lounge - June 23, 2002
|
|
|
|
|
Excuse my (!knowledge ) of WebServices.
Let's say I have a simple WebService that accepts 2 integers and give you back the result of addition.
What's the way to make this service known to other applications. Do you need to setup some central server, so it would keep track of all services (let's say in an Intranet), or is there a standard way to do it ?
Thanks
Venet.
--------
Black holes are where God divided by zero.(Steven Wright)
|
|
|
|
|
Hi Venet
Have a look at UDDI.
If you're doing this more for a test, then maybe link your webservice from XMethods.
HTH
Cheers,
Simon
"Every good work of software starts by scratching a developer's personal itch.", Eric S. Raymond
|
|
|
|
|
Thanks Simon,
Question answered. This is exactly what I needed.
Venet.
--------
Black holes are where God divided by zero.(Steven Wright)
|
|
|
|
|
I've extended the TreeNode control to add an additional property. Now, what
I'd like to do is capture the MouseDown event so I can perform some tasks
when either the left or right mouse button is clicked. However, I can see
that the TreeNode doesn't have any events to override. I tried capturing it
with the TreeView control, but can't get the underlying object that was
clicked.
Any ideas? I was thinking about creating my own custom event in my extended
control (TreeNodeExID)... but I can't find any examples or documentation...
-AC
Andrew Connell
IM on MSN
andrew@aconnell.com
|
|
|
|
|
Override the WndProc procedure and handle the Windows Message WM_LBUTTONDOWN:
class TreeNodeExID : TreeNode
{
...
public const int WM_LBUTTONDOWN = 0x0201;
protected override void WndProc(ref Message m)
{
if(m.Msg == WM_LBUTTONDOWN)
{
}
base.WndProc(ref m);
}
}
|
|
|
|
|
RSA Parameters has an Exponent value and Modulus value how do i combine these to get the public key
|
|
|
|
|
How can I fill ( or create ) a Enum using DB records as items ??
Or How can I override a enum declaration ?
( I want to add items to an Enum declarated in other class )
thanks
Marcelo Duarte
uruguay
|
|
|
|
|
This may be possible by progmatically writing code and then using Emit() to generate a runtime assembly, and then using that code.
But really, you shouldnt add so much complication. Better to keep the records in their native format.
|
|
|
|
|
Christopher Lord wrote:
Better to keep the records in their native format.
Agreed.
It might also be an option to check out Typed Datasets.
Cheers,
Simon
"Every good work of software starts by scratching a developer's personal itch.", Eric S. Raymond
|
|
|
|
|
Hi!
I want to know if there's an API I can use in .NET that makes it possible to read text from any program if I e.g. do a right-click and hold ALT.
Something like an OCR API reading from screen... well, I don't know how to describe it correctly, but if you know the tool "Babylon Translator" you know what I mean...
Thanks in advance!
|
|
|
|
|
I have set up a remoting host and client, and they work well. Now I would like the host to send a file to the client, but can't figure out how to do it. I need a function in the remoted object that would look something like this-
Public Function FileTran() as File
return C:\test.txt
End Function
I know this is completely incorrect, but you get the idea of what I'm trying to do.
Can anyone please give me some pointers?
Thanks in advance,
Steve
P.S. VB.NET code prefered, but C# would be fine too.
|
|
|
|
|
Well, look into Stream objects. I've never used them over a remoting link, but if MS did a really good job it should be seemless.
If not, you'll have to chunk and send, which will be slow but will get the job done.
Simply chunk your file into a buffer, and send the buffer across the wire as an array of bytes, and then reconsitute. Thats not gonna be a whole lot of fun, though.
|
|
|
|
|
Do you think it would matter whether I marshal by ref or serialize? I'm asking because I've never remoted serialized objects, but I've seen them mentioned frequently.
|
|
|
|
|
I've only done minimal work over remoting as well. I figure that serializing a remote object will work great, but again I cant be sure. sorry.
|
|
|
|
|
I've been messing around with streams and had all kinds of problems, so I decided to try putting the file into an array of bytes like you said (thanks for that advice). I'm just wondering if you know what the disadvantage of that is.
|
|
|
|
|
Large files will be very inefficent, since the whole thing will have to be read into ram, and then 'sent' all at once. Since the wire cant send the data all at once, this will cause a 'lock up' unless you use async or threading.
|
|
|
|
|
I have tried both methods, returning a file stream vs. filling a big byte[] buffer and I found that the byte[] buffer was much faster which suprised me. I too was worried about the inefficiency of using large chunks of ram but I guess it just depends on the amount of RAM on your server, the average file size and the number of requests served. You could also compress the file data before you put it in the byte[] buffer, saving memory and speeding transfer times.
Joel
|
|
|
|
|
When you used the buffer method, did you use a singlecall or singleton object? Cause I'm using a singlecall object, and everytime I call the function to send the next buffer, the stream object (that is global in the remoted object) has been erased. On top of that, I can't find a method to have the filestream start at byte X without going back through the file again. Any advice or code snipets you could offer?
Thanks for the info,
Steve
|
|
|
|