arrow_upward
Developing in Machine Code
#1
I have recently gotten into developing purely in machine code. I am overjoyed by how efficient when it comes to processing speed. However, i am pondered by whether i made the right call in developing purely in machine code. Does dealing with al the syntax or lack-thereof in machine code really worth the increase efficiency? my next goal is to build a website in machine code and see how well that does. I mean, how more efficient will i get in comparison to a website built on HTML? am i really kidding myself here by thinking that this is worth my time and effort. I am interested in hearing what y'all think.



[+] 1 user Likes kirajackson's post
#2
Whether it's worth your time and effort depends a bit on your goals. For a performance boost at such a high level as a website? Probably not. Writing in machine code is, however, and excellent exercise and you learn more about how computers work in a way. It also forces you to think more about how to tackle a problem in advance. (Full disclosure, I've only done it once back in college and it was hard as fuck and we had to rewrite a lot of code throughout the course). Who knows, maybe some day you'll actually need to code something in machine code for some low level stuff or performance increases you could not otherwise get.



#3
There's really no reason to write in machine code. Writting assembly is a good exercise, but if you want efficiency, you're more likely to get efficiency on C, as compilers today will likely find optimizations that you won't be able to code. You're also gonna have a hard time refactoring or expanding your code.



[+] 1 user Likes Tyronejonesnegus's post
#4
Just keep at it. I put in a few hours of focused coding every day and watched a lot of Tech Lead. Now I write faster programs than my friend who works in C faster than his computer compiles his code.



#5
over time the efficiency and performance may not be worth the time you could have saved doing it the easier way, but it will definitely be a valuable skill



#6
Uh by machine code are you talking machine code as in assembly or machine code as in raw opcodes with a hex editor? Assembly is insane enough but if you're meaning raw opcodes then I actually do not believe you, at least if you're talking about x86 opcodes. Not only is that a massive waste of time, you're generating worse code than a compiler with all its optimizations. Make your life easier. Use a high level language and your productivity will soar off the charts relative to what you're doing now.



#7
If your assembler has good macros then I certainly believe you can write swiftly.

When it comes to performance critical code, there no chance a C compiler can produce better assembly than a competent human. In most programs though, there are very few truly critical kernels that require such treatment. Most of my significant programs are simulators of various kinds, but CPUs are so fast these days that I can't remember the last time I ever had to use assembly for anything -- just don't make egregious performance errors at the higher level.

If you want a fast website then building your website and webserver as one unit in C is very easy, just basic sockets. Handling lots of concurrent connections is a bit of work though.

In the 90s the "meta" for DOS programmers was to write primarily in a higher level language (basic, pascal, c) then link with hand crafted assembly libraries for various things like graphics (cpu only back then), mouse, keyboard, sound, extra memory (xms/ems). It was a glorious time of exploration and a time when one man truly could 'know it all'. Now, these techniques are obsolete, and sadly, the thinking required has also mostly disappeared.



#8
Machine coding is great all around



[+] 1 user Likes January123's post