Assembly Language

SergiusPaulus

Active Member
Messages
596
Would a time machine or device or program that could send data to the future or past be written in assembly language or rather a high level language? What I have read about assembly language it seems to have the most control over a device.
 

Einstein

Temporal Engineer
Messages
5,399
Would a time machine or device or program that could send data to the future or past be written in assembly language or rather a high level language? What I have read about assembly language it seems to have the most control over a device.

I've been trying to understand what scientists are talking about when using the word "Quantum" in descriptions. There is no simple answer. But using one interpretation comes to mind to answer your question. Apparently a Quantum of time might be in order. It would be described as the minimum amount of energy defined by a frequency. The problem I see is that to avoid corrupting the data, a way would have to be found to send the data outside of our universe and then re-enter our universe at the appropriate destination.
 

SergiusPaulus

Active Member
Messages
596
Ai was suggesting that firmware is usually written in low level language like assembly. While the operating system is usually written in high level languages.

So maybe a futuristic device combines low and high level programming.

One scenario is not to try to go forward or back in time but rather just attempt to leave our dimension and tunnel into another parallel world and return. Don’t worry about the time yet. Just cross a dimension. “the many worlds theory which tries to explain how quantum elements being able to be two values simultaneously.” This theory was first proposed by Hugh Everett in 1957 as a way of explaining the paradoxical behavior of quantum particles, which can exist in multiple states simultaneously.
 

MODAT7

Active Member
Messages
550
Ai was suggesting that firmware is usually written in low level language like assembly. While the operating system is usually written in high level languages.

So maybe a futuristic device combines low and high level programming.
I had a semester of assembly language at university. It's good to know to understand how the low levels of a processor works, but I'd never use it on any real project that I'd do.

You do have absolute control if you write in assembler, but you have to know EVERY NITTY GRITTY DETAIL ABOUT EVERYTHING to really pull it off... and that will drive most people insane... especially since many of those low level hardware capabilities are poorly documented and implemented. Game programmers will often use short chunks of assembler because they need something that executes very fast. Games have to execute in real time, so this is somewhat expected. The rest of the game is usually written in C or C++.

Most operating systems are written in C or C++ (at least the core pieces that need to execute fast). Properly written code can be close to assembler speeds. Other higher level languages are anywhere from 10-50x slower. Java and Python are some of the worst in terms of bloat and lack of speed.

What coding language a time machine would use would depend on how fast it needs to execute. Low level stuff handling frequencies and such in real time would need something fast. If there's recording, video and audio codecs would need something fast. Overall monitoring and reporting could be done in something slower. Most of the time, programmers will chose the language more on what existing libraries and code already exist, so they don't have to program what's already been done. This makes sense to an extent, but if performance is needed and a slow and bloated language is chosen out of laziness, this becomes a very bad choice... and then they start yelling and arguing that your brand new computer isn't fast enough... and then a holy war breaks out and gets nasty.
 

SergiusPaulus

Active Member
Messages
596
Perhaps new syntax in the future will allow us to do things that we have not been able to do before. Also some new hardware development would be needed. Technology is advancing so quickly that it would seem that certain abilities are not widely known as of yet.
 

SergiusPaulus

Active Member
Messages
596
Ah. Chatgpt response.
Is assembly language being updated?



Yes, assembly language is still being updated and evolved to keep up with changing technologies and to improve its functionality. Assembly language is a low-level programming language that provides a direct interface between the hardware and software of a computer system, allowing developers to write programs that can access and control specific hardware components.
Newer versions of assembly language are typically developed to support new processors, microcontrollers, or other hardware components that have different instruction sets or functionality from older ones. As computer hardware continues to evolve, assembly language is updated to take advantage of new features and capabilities.
In addition, there are different variants of assembly language for different processor architectures, such as x86, ARM, and MIPS. Each variant may have its own updates and changes to support new features and capabilities of the respective processor architecture.
Although assembly language is still used for certain applications, high-level programming languages have become more popular for most software development, as they offer greater ease of use and abstraction from the underlying hardware. Nonetheless, assembly language remains an important tool for low-level system programming, such as device drivers, operating system kernels, and embedded systems.
 

vp8671

Member
Messages
154
I felt compleed to answer since I work as a software engineer , asembly language is a low level language, meaning is closer to the metal rather than , say , c++ , but if you think that you can do magic just becasue of that, forget it. Language compilers are so optimized today that re writing a program in assembly wouldn't bring a speed increase of maybe less than 10%.
A different story is if you want to write softare for embedded devices or microcontrollers, they also have high level language similar to basic or c.
 

Beholder

Senior Member
Messages
1,025
I felt compleed to answer since I work as a software engineer , asembly language is a low level language, meaning is closer to the metal rather than , say , c++ , but if you think that you can do magic just becasue of that, forget it. Language compilers are so optimized today that re writing a program in assembly wouldn't bring a speed increase of maybe less than 10%
I usually get an 8X performance increase from assembler intrinsics by enabling SIMD vectorization and reducing how many times the same cache line is read. If done together with manual scheduling of memory reads, preventing cache misses, looping over data within L1 data-cache, tuning loops for register and instruction window size, doing trigonometry using bitwise operations, et cetera, you may in total get a 100X to 1000X speed increase compared to C++ code that the average firmware developer writes.
 

vp8671

Member
Messages
154
Please show me a code which increases the speed to a 1000x times , becasue i'd like to see it, in gcc or vscode, you can use intrinsics just by settings compiler flags. I got some speed gains using fpu sin and cos functions rather than using precomputed tables.
 

Beholder

Senior Member
Messages
1,025
Please show me a code which increases the speed to a 1000x times , becasue i'd like to see it, in gcc or vscode, you can use intrinsics just by settings compiler flags. I got some speed gains using fpu sin and cos functions rather than using precomputed tables.
I can show you a math trick for deriving polynomials. Store coefficients using for a + bx + cx²/2... in registers and use name aliasing for referring to input and output. Shifting your perception of which register holds which multiplicity with pre-multiplied units optimized for physical simulation will do the operation at zero cost, in other words infinity faster in that specific part by being flexible with how you define units.

Changing units is also used to sample textures efficiently using fixed precision integers so that multiple bit shifts are merged into one, unzip instructions for division and modulo, et cetera.

If you can throw in a hundred of these tricks into the same code, you may soon have a 200x performance increase over the entire application. Can't refer to my open source optimizations anonymously, but this is used a lot in image analysis and software rendering.
 
Last edited:

Top