20,376 karma · joined Feb 7, 2017 (9y ago) · 7,594 submissions
comment 10h ago · link · parent
While the desktop CPUs are configured by default to be able to use up to 10 to 20 W per core, in order to reach high clock frequencies, e.g. up to 6 GHz, nobody stops you from configuring them to use lower clock frequencies and supply voltages, so that the power consumption stays limited to less than 3 W per core, like in server and laptop CPUs.
For AMD CPUs, the CPU cores are the same in server CPUs and desktop CPUs, so until and including Zen 5 there was no difference in the performance per watt that was reachable in server CPUs and desktop CPUs with lower power limits.
Nonetheless, what is new in Zen 6 is that the cores used in the 32-core chiplet have a higher IPC than the cores used in the 12-core chiplet, which are optimized for higher clock-frequencies.
That means that when the 12-core chiplets are limited to a low clock-frequency and power consumption, their computational throughput per core will be lower than for the 32-core chiplets at the same power consumption per core.
So you happen to be right that because of this change that happened in Zen 6, a desktop CPU with a 32-core chiplet would reach a better performance per watt at the same power consumption per core. Nonetheless, the difference should not be great.
comment 15h ago · link · parent
Also some ordinary plastic materials (I think polystyrene might be among those) harden if you flex them repeatedly, but when they harden they also become very brittle, so you can break them very easily.
If you have a stick of such a plastic, it is easy to notice this behavior, because in the beginning you can flex the stick easily, but after a few times it becomes much harder to flex, but if at that time you continue flexing it, it breaks immediately.
comment 16h ago · link · parent
Firefox has ton of bugs that they do not seem to have any intention to fix.
For example, the "print" command for a Web page almost never works correctly, the "printed" page is rendered in a very different way than how it is rendered on screen and many elements are corrupted. There are browsers, e.g. Vivaldi, which have much higher chances of rendering correctly a "printed" page, so it is definitely possible to do that, but Firefox does not bother.
The so-called "download manager" of Firefox is also garbage, because the downloads are extremely frequently interrupted and they must be restarted manually. I tried a Firefox extension that has the purpose of restarting downloads automatically. It behaved very weirdly. It worked once, after the initial installation, but after a reboot it never worked again, not even after deleting it and reinstalling it (disabling the extension and re-enabling it also had no effect).
On Linux with NVIDIA GPUs, there are years since hardware acceleration for various things no longer works in Firefox and WebGL and a few other such things do not work at all, preventing the rendering of many Web pages, while everything works perfectly in Chrome/Chromium/Vivaldi. Firefox claims that it does not detect OpenGL, despite the fact that any other OpenGL or Vulkan application that I use, including those that I write myself, have no problem whatsoever with detecting and using OpenGL or Vulkan. Firefox options that attempt to force GPU/OpenGL detection have no effect.
And so on.
So the bar for making a browser better than Firefox is very low, thus there are chances that Ladybird could surpass it.
comment 1d ago · link · parent
I find much easier to keep in mind the UTC time of the day when it is noon where I live and the currently valid time zone offset for that place, which I add to the UTC time when I want to know the official local time, than to change the clocks or anything else according to DST.
comment 1d ago · link · parent
The problem with kids' school seems very American. I have always found weird in American movies how parents drive their children to school.
In Europe, when I was a child, something like that would have been an extraordinary event and such children would have been looked down as morons who are unable to go to school by themselves, and this even when 6 or 7 years old. It is true however that schools were usually not too far to walk to them, or if they were far there was adequate public transportation.
comment 1d ago · link · parent
For the actual descriptions of instructions and registers there is no alternative for quoting the exact descriptions from the Arm documentation.
I cannot consider this site as anything else but fair use, because it does not provide financial gains to the author and it does not cause any financial losses to the Arm company, because the quoted documentation is freely available.
I always prefer to use the original documentation, because I am wary of errors in secondary sources, but it is not easy to search and navigate, so I think that this site must have been useful for many.
comment 1d ago · link · parent
comment 1d ago · link · parent
During the early seventies, it was argued (inclusively by Knuth) that all undesirable effects of using "goto" can be prevented if "goto" is restricted to jump only forwards and only to the same block or to outer blocks, i.e. never backwards or into inner blocks.
This kind of restricted "goto" was available for example in the language Xerox Mesa, a very innovative language, which has influenced many later languages, including Modula, Ada and Python.
In the comment thread from TFA, someone wrongly says that completely avoiding "goto" in programs is fine, because the programs without "goto" "would not loose any amount of expressive power".
This is false. Unfortunately many more people are aware of the research paper that claimed that using "if ... then .. else ..." and "while ... do ..." is sufficient for writing any problem, than of the fact that later research papers have demonstrated that this claim is true only when you accept a more inefficient program. There are instances of using "goto" which can be replaced with the structures mentioned above, or with any other of the program structures that were favored by the "structured programming" fashion, only by adding superfluous variables or superfluous jumps, which increase program size and execution time.
Nonetheless, the restricted form of "goto" mentioned above, together with the classic alternative and iterative program structures, is sufficient to implement any program with optimum efficiency.
comment 1d ago · link · parent
The external magnetic fields are weak and the internal magnetic fields from motors or other devices can be avoided by either choosing a distant position for the MRAM or by using a simple magnetic shield.
So MRAM is certainly preferable in any aircraft or spacecraft application, because of its much greater resistance to radiation than that of flash memory.
Also, in all other applications mentioned by you, a magnetic shield would not increase much the cost, weight and volume, as a thin sheet of high-permeability metal should be sufficient.
comment 1d ago · link · parent
I use Linux on all my desktop and laptop computers. Besides personal computers, I use Linux on some computational servers with GPUs, which have adequate software support, e.g. CUDA, only for Linux.
In the past the main advantage of Linux was in supporting a much greater range of hardware devices, but in recent years Linux has introduced more and more features that are much better than what POSIX specifies, for instance io_uring, so if you write Linux-specific programs you can get much better performance than with generic UNIX programs.
I use FreeBSD on my servers that have networking or storage functions (e.g. I have my own routers/firewalls and e-mail/web/DNS/NTP servers). In the now distant past, FreeBSD had much better performance than Linux, but then it lost several years with a very slow transition from single-threaded CPUs to multi-threaded CPUs, during which Linux leaped ahead, and then FreeBSD never recovered completely the lost advantage.
Nonetheless, I still prefer FreeBSD in many servers, because it requires much less administration work than Linux (i.e. there are better default configurations and many of the administrative utilities are simpler and more logical, so you get done faster any management work; sometimes years may pass during which I do nothing else for the FreeBSD servers, except reading the periodic automatic e-mail reports from the servers about significant events and statistics).
Moreover, while Linux supports many peripherals that are not supported by FreeBSD, there still are some peripherals that have better support in FreeBSD, e.g. tape drives and other SAS/SCSI peripherals.
So in my opinion it is better to be familiar with both Linux and FreeBSD and use whichever is more appropriate for a given application.
For someone without experience in server administration, installing and configuring one of the *BSD operating systems is much more likely to result in a server with acceptable performance and safety, than when installing some Linux distribution, where one would need to be much more knowledgeable to make the correct choices.
On the other hand, installing a *BSD on a modern laptop is much less likely to work immediately, without fiddling for hours or even days with various options, until making most of the peripherals to work.
comment 2d ago · link · parent
If you have no debugging information for the file, you cannot know that some byte sequence is unreachable code.
To identify what such a sequence of bytes is, you can try to decode it in various ways, e.g. by disassembling it, by interpreting it as ASCII or Unicode characters, by interpreting it as a sequence of floating-point or integer numbers, etc. If anyone of these decoding attempts looks plausible, you can guess that it is correct. So if it disassembles into a sequence of plausible instructions, you can conclude that it is unreachable code, but your guess is seldom certain.
In any case, the disassembling may start only by executing the program and following the control flow, and also noting all memory addresses that are accessed by loads and stores.
If after that there remain memory regions that have not been accessed in any way, possibly because you could not simulate all the possible program inputs, e.g. because the program accessed a hardware dongle that you do not possess, then you can start to decode in various ways the regions with unknown content, attempting to guess their purpose.
comment 2d ago · link · parent
I am not aware of any other situation where you have a sequence of bytes that are machine instructions and that must be disassembled, except when you have extracted them from a binary executable file after identifying their location, which is indeed a part of reverse engineering.
If you do not extract the bytes to be disassembled from a binary file that you have generated yourself, then that is a part of reverse engineering.
If you generated the binary file yourself, you have no need to disassemble it. If you want to look at the assembly language program, you do not need to disassemble anything, because whatever tools you used to generate the binary will provide the assembly language equivalent.
comment 2d ago · link · parent
But from where can you get such bytes?
Normally such bytes can be obtained only from a binary executable file, by what you called "reverse engineering", though complete reverse engineering includes a lot of work beyond identifying the machine instructions inside a binary file and disassembling/decompiling them.
I cannot imagine what source of bytes that are machine instructions do you have in mind, otherwise than those that must be obtained through reverse engineering.
If you generated yourself the binary file, there is no need to disassemble it, because any high-level language compiler provides upon request the corresponding assembly language program.
comment 3d ago · link · parent
Disassembling directly an executable program, especially when it is some proprietary program for which there is no debugging information, is likely to produce a lot of garbage that does not correspond to correct assembly instructions.
Correct disassembly can be obtained only by simulating the execution of the program and disassembling only the instructions that are reached in this way. This is still not completely foolproof, because during simulation some parts of the code might be reached only for some specific input data, which is unknown. Sometimes one may guess all the possible inputs and disassemble anything reached in this way, but in reality some of those inputs can never occur, which can lead to erroneously disassembling parts that should not be disassembled, as they are not instructions.
That said, most executable programs are easy to disassemble, but some may be intentionally or unintentionally very obfuscated, and for such cases any disassembling tool would have to be guided by a human to achieve a complete disassembly.
comment 3d ago · link · parent
Nonetheless, the title of the paper by Andrew Appel (Garbage Collection Can Be Faster Than Stack Allocation) was just a false statement, which today would be called a clickbait title.
No method of dynamic memory allocation can be faster than stack allocation, if the latter is done correctly.
In Appel's paper, he claimed that if you have tons of memory, than the overhead of freeing memory by the garbage collector can become low, because of its laziness, i.e. the garbage collector will be invoked only when there is a huge amount of memory that must be freed, so the overhead per freed byte will be low, even lower than when stack-allocated memory is freed word-by-word.
However, this comparison is a classic example of a straw man. When memory is abundant, many compilers implement an optimization where stack deallocation is delayed as much as possible, in order to free with a single instruction large amounts of memory. So the same lazy deallocation strategy is also available for stacks, and the difference between a single instruction needed for stack deallocation and a long procedure needed by the garbage collector is enough to ensure that for any realistic amount of available memory, stack allocation is the most efficient.
Obviously, stack allocation is not applicable to everything, which is why other techniques, like reference counts and garbage collectors, are also necessary.
comment 4d ago · link · parent
Obviously, it was published immediately, despite the reviews not being finalized, when it became known that an AI-assisted proof was announced (but I understand that the complete AI proof has not been published yet).
comment 4d ago · link · parent
I assume that it was also true for the Microsoft BASIC for MS-DOS and later, but on IBM PC clones I had no need to use BASIC, as I had compilers for better programming languages.
EDIT: Looking now in Wikipedia, I see that the VIC-20 BASIC was derived from the Microsoft BASIC, so it has inherited from there the integer variables marked with "%".
Most BASIC interpreters bundled with the early microcomputers were derived from the Microsoft BASIC, which was the main product of Microsoft at that time. Therefore it is likely that few, if any, BASIC interpreters for microcomputers lacked integer variables.
comment 4d ago · link · parent
You can eventually obtain the same performance in C++ like in Fortran, by defining your custom array types, with a complete set of operators and functions for them, possibly using inline assembly or SIMD intrinsics for implementing trickier operations. The same may be true for other programming languages that are extensible enough.
But just replacing Fortran with another currently popular programming language is not sufficient, without some extensive support libraries.
comment 4d ago · link · parent
The preliminary Fortran specification was written in 1954, while the first version of C is from 1974.
The first Fortran implementation is from 1956, but that was not yet a complete high-level programming language, because any complicated functions and subroutines had to be written in assembly language.
In 1958, "Fortran II" added the features required to write any functions and subroutines also in Fortran, so that can be considered the first complete implementation.
Even when considering the first complete implementation, not the first written specification, C would be 16 years younger.
Even if modern Fortran compilers can still compile old Fortran programs, when writing a new Fortran program that would resemble very little with the original Fortran.
comment 4d ago · link · parent
The languages that are extensible, like C++, allow the definition of custom data types and of operators for them, with which the defects from the language specification can be compensated.
But that means that it is not enough to choose a programming language to replace Fortran, but also a set of libraries that would provide facilities at least as good as those provided by default in Fortran.
Such libraries introduce additional dependencies, so the choice is not simple.
Julia is one of the very few programming languages that has been intended for the same domain of applications as Fortran, but Julia has made some controversial design choices and it is doubtful that there are many cases where substituting Fortran with Julia would be a definite improvement in comparison with using the latest Fortran standard.
comment 4d ago · link · parent
On the other hand, the performance per area of the "traditional" CPU that is used for comparison, which I assume that it is some kind of RISC-V, is very poor, so that the performance per area of the new CPU is likely to be also poor, even if much better than that of the strawman.
Their "traditional" CPU has an area that is slightly bigger than that of Cortex-A720 made with a CMOS process almost twice as dense.
So if they were made with the same process, the "traditional" CPU and the new CPU would have an area somewhat bigger than a half of a Cortex-A720.
But Cortex-A720 is an out-of-order 4-wide superscalar core with advanced SIMD and scalable vector extensions, with a good branch predictor and with many other enhancements, for which the area ratio in the same process is expected to be much greater than 2 in comparison with the CPUs evaluated in TFA, while its performance must be several times greater than that of a 2-wide in-order CPU core.
So both the "traditional" CPU and the Frostbite CPU appear to have a much bigger area than expected for their performance.
Moreover, the performance of in-order CPUs is very sensitive to the benchmark selection and to the quality of the compiler optimizations.
So the performance obtained for the benchmarks selected by them, like FFT or LU decomposition, is expected to be much better than for benchmarks that would execute an application not dominated by such regular loops, but having lots of hard to predict branches, e.g. a compiler benchmark.
They say that the ISA will be published. At that time it will be easier to appreciate whether this CPU architecture is really innovative. For now, they have done a lot of work, by fully implementing the CPU core, but the data presented is not sufficiently convincing to demonstrate that it is indeed an architecture that will be able to compete with SOTA CPU cores, e.g. with those from the Arm company.