Longhorn and ASM

Started by
182 comments, last by CProgrammer 20 years, 1 month ago
When longhorn coms out, will Assembler still be good for optimizing. As I''ve heard that longhorn will be based on the .NET frameowrk meaning c# will be native, that leaves me to wonder wether C# code will be faster than assembler code, assuming both versions are perfectly programmed. Any thoughts? -CProgrammer
Advertisement
As good as it ever was.
char a[99999],*p=a;int main(int c,char**V){char*v=c>0?1[V]:(char*)V;if(c>=0)for(;*v&&93!=*v;){62==*v&&++p||60==*v&&--p||43==*v&&++*p||45==*v&&--*p||44==*v&&(*p=getchar())||46==*v&&putchar(*p)||91==*v&&(*p&&main(0,(char**)(--v+2))||(v=(char*)main(-1,(char**)++v)-1));++v;}else for(c=1;c;c+=(91==*v)-(93==*v),++v);return(int)v;}  /*** drpizza@battleaxe.net ***/
There will most likely be some MSIL ASM you can use.

Or you could always screw Longhorn and hope everyone else does too.

[My Image Gallery (WIP)][Greatest Tetris clone evar!][Return your stolen MP3s]

[edited by - Valderman on January 15, 2004 9:45:11 AM]
What the fuck does that mean?

It''s not like Longhorn is going to disallow native code.

char a[99999],*p=a;int main(int c,char**V){char*v=c>0?1[V]:(char*)V;if(c>=0)for(;*v&&93!=*v;){62==*v&&++p||60==*v&&--p||43==*v&&++*p||45==*v&&--*p||44==*v&&(*p=getchar())||46==*v&&putchar(*p)||91==*v&&(*p&&main(0,(char**)(--v+2))||(v=(char*)main(-1,(char**)++v)-1));++v;}else for(c=1;c;c+=(91==*v)-(93==*v),++v);return(int)v;}  /*** drpizza@battleaxe.net ***/
quote:Original post by CProgrammer
When longhorn coms out, will Assembler still be good for optimizing. As I''ve heard that longhorn will be based on the .NET frameowrk meaning c# will be native, that leaves me to wonder wether C# code will be faster than assembler code, assuming both versions are perfectly programmed.


C# will be native to the OS, whereas ASM is native to a particular processor or family of processors. There still needs to be translation between the higher level language and machine code, so ASM will still be the faster option(Assuming you can write perfectly optimised code that is better than the C# compiler!)

James

quote:Original post by Valderman
There will most likely be some MSIL ASM you can use.

Or you could always screw Longhorn and hope everyone else does too.

[My Image Gallery (WIP)][Greatest Tetris clone evar!][Return your stolen MP3s]

[edited by - Valderman on January 15, 2004 9:45:11 AM]


There is MSIL ASM and you are able to use it. I have one book on the subject as I plan to learn and use it for optomizing some parts of my C# applications.
quote:Original post by jamessharpe
quote:Original post by CProgrammer
When longhorn coms out, will Assembler still be good for optimizing. As I''ve heard that longhorn will be based on the .NET frameowrk meaning c# will be native, that leaves me to wonder wether C# code will be faster than assembler code, assuming both versions are perfectly programmed.


C# will be native to the OS, whereas ASM is native to a particular processor or family of processors. There still needs to be translation between the higher level language and machine code, so ASM will still be the faster option(Assuming you can write perfectly optimised code that is better than the C# compiler!)

James




Actually unsafe ASM takes a large speed hit if you are talking applications for Windows Longhorn onwards. Also note that for 80-90% of users.. unmanaged code will simply NOT run anymore. The security options are defaulted not to let "unsafe" applications run. So if a user tries to it will pop up a box warning them of the potential security and stability problems from running an unmanaged application. That alone puts managed code on the forefront because 80-90% of those users are NOT going to let something "UNSAFE WITH POTENTIAL SECURITY AND STABILITY RISKS" run on their system. =]
quote:Original post by DrPizza
What the fuck does that mean?

It''s not like Longhorn is going to disallow native code.



Correct.

You are able to use native code.. but there is a performance hit (currently benchmarks are showing C# running faster than unmanaged C++ with ease. We are talking a good 10-40% faster depending on the application. BUT this may change by release so who knows).

Also there are the security issues and the fact that most users won''t run "unsafe" applications.

Please note WinXP -> Win Longhorn is a paradigm shift in Microsoft operating systems. It is just like the DOS->win95 shift. How many DOS programs do you use today? I saw them all die out about a year or two after people claimed the change would never happen =]
quote:You are able to use native code.. but there is a performance hit (currently benchmarks are showing C# running faster than unmanaged C++ with ease. We are talking a good 10-40% faster depending on the application. BUT this may change by release so who knows).

What the hell are you talking about? Certainly my copy of Longhorn shows no such thing. How on earth are they going to make native code slow down?

quote:Also there are the security issues and the fact that most users won''t run "unsafe" applications.

Most users will have no choice but to run unsafe applications, so again one wonders what you''re talking about.

char a[99999],*p=a;int main(int c,char**V){char*v=c>0?1[V]:(char*)V;if(c>=0)for(;*v&&93!=*v;){62==*v&&++p||60==*v&&--p||43==*v&&++*p||45==*v&&--*p||44==*v&&(*p=getchar())||46==*v&&putchar(*p)||91==*v&&(*p&&main(0,(char**)(--v+2))||(v=(char*)main(-1,(char**)++v)-1));++v;}else for(c=1;c;c+=(91==*v)-(93==*v),++v);return(int)v;}  /*** drpizza@battleaxe.net ***/
quote:Actually unsafe ASM takes a large speed hit if you are talking applications for Windows Longhorn onwards.

No it doesn''t.

quote:Also note that for 80-90% of users.. unmanaged code will simply NOT run anymore.

Yes it will.

quote:The security options are defaulted not to let "unsafe" applications run.

No they aren''t.

quote:So if a user tries to it will pop up a box warning them of the potential security and stability problems from running an unmanaged application.

Screenshots, please.

quote:That alone puts managed code on the forefront because 80-90% of those users are NOT going to let something "UNSAFE WITH POTENTIAL SECURITY AND STABILITY RISKS" run on their system. =]

That they install ActiveX controls with that same warning without the slightest thought suggests otherwise.
char a[99999],*p=a;int main(int c,char**V){char*v=c>0?1[V]:(char*)V;if(c>=0)for(;*v&&93!=*v;){62==*v&&++p||60==*v&&--p||43==*v&&++*p||45==*v&&--*p||44==*v&&(*p=getchar())||46==*v&&putchar(*p)||91==*v&&(*p&&main(0,(char**)(--v+2))||(v=(char*)main(-1,(char**)++v)-1));++v;}else for(c=1;c;c+=(91==*v)-(93==*v),++v);return(int)v;}  /*** drpizza@battleaxe.net ***/

This topic is closed to new replies.

Advertisement