19

I once had a class mate who argued that coding in C not only produced faster code than .NET C#, but that he could actually produce applications faster than me in C.
I challenged him to make a Web browser. While he was struggling to remember if it was #include <stdio.h> or #include <iostream>, I started typing WebBro... and let IntelliSense work it's magic.
Needless to say I won.
Sadly, he wouldn't admit his defeat but went on about how much faster his browser would run in the end...
He has yet to release a Web browser written completely in C.

Comments
  • 12
    if he cant remember what the C standard Input Output library is................ how could he make anything in C?
  • 6
    @mattwebdev I'm pretty sure I made that part up for dramatic reasons 😂
    But the gist of my rant still holds true, I had a minimal webbrowser within minutes, he didn't.
  • 1
    Is C# slower than C, though?
  • 5
    @sheeponmeth ouch, don't go there man. 😂 Commence flame war!
  • 1
    I'm just wondering. Every language has it's tradeoffs.
  • 0
    @sheeponmeth all I know is, his web browser is slower than mine since to visit any page with his browser I'd have to first write his web browser. Hence one could make the argument that C# is faster in this particular case. You might have a point though.
  • 1
    Performance wise nothing can beat a C program as it's compiled to machine code . Now if we are talking time spent on developing an application , yes, then C becomes a burden and sometimes an obstacle.
    keep in mind everything in programming and software development has it's areas where it shines and others where it falls apart , let it be languages , tools or any other thing .
  • 5
    C# as a language is NOT faster than C. Development and productivity is higher than C, but execution wise, there is no argument here. Simply because he couldn't write a web browser in C doesn't make C# faster, it just means it takes significantly more code to accomplish the same task. One simple example, write a doubly-linked list in either language. C#: LinkedList<type> myList; C: Lines and lines of almost unintelligible pointers and memory allocations and deallocations.

    Like, OMG, C# is so much faster, look, I wrote a doubly linked list before you could even open your editor. So much speeds. 😑
  • 0
    @skonteam you can only do so much with a Phillips head screw driver
  • 0
    @skonteam is C# not compiled into machine code? I thought it was.
  • 5
    Your friend could have just fork() then execpl("chrome", NULL)
  • 1
    @sheeponmeth C# is compiled to IL (intermediate language) whifh is later compiled to machine code. IL separates code dependency on the CPU architecture. it also lets you code in langs like VB, F# or J# (CLR compliant languages) and use libs written in C#
  • 0
    @skonteam Well, pure assembly written by a skilled coder can.
  • 1
    @parasdpain Oh, okay, that make sense. That's pretty interesting. I'm not a Windows user at home and I just work the Service Desk at work, so I've never actually looked into it.
  • 1
    @sheeponmeth I think this SO thread explains it quite well ->
    http://stackoverflow.com/questions/...
Add Comment