New answers tagged

0 votes

If python compiles to assembly and an OS is written in it, will it compete favorably with C in benchmarks?

There are JavaScript implementations using JIT compilers that come pretty close to C efficiency. Enough to run a word processor or spreadsheet in a browser. (Apple does this by switching from ...
user avatar
  • 37.4k
0 votes

If python compiles to assembly and an OS is written in it, will it compete favorably with C in benchmarks?

This may be possible if you write in a restricted version of Python that can be easily compiled/optimised to machine code. Python as it's commonly used are very dynamic, and it contains a number of ...
user avatar
  • 12.2k
0 votes

If python compiles to assembly and an OS is written in it, will it compete favorably with C in benchmarks?

Python is intrinsically slower than C. For example, addition in C can compile into a single machine instruction, while Python needs to perform a runtime lookup to check if any of the operand types has ...
user avatar
  • 54.6k
0 votes

Is there any specific reason to use "else if" clause?

The number of days in a year is 365, except every four years it is 366, except every 100 years it is 365, except every 400 years it is 366. (There was lots of code getting it wrong in the year 2,000, ...
user avatar
  • 37.4k
0 votes

Is there any specific reason to use "else if" clause?

Try this code with if and else if... You will definitely understand the difference. #include <stdio.h> int main() { int time = 5; if (time < 10) { printf("It is less than ...
user avatar

Top 50 recent answers are included