Today to a friend reply e-mail, the main content is my last two days of a DXR pro++ curing problem, he does not seem to understand why I have been avoiding the search tree, in fact, I do not understand, just know to avoid, also avoided, and this is not enough, while avoiding all sorts of other search, sort, hash algorithm, almost all of the algorithms have tried to avoid me. So, ultimately, my DXR Pro curing design is initially completed (This design is not public, nor ready to open, but I think the idea is more important than the method, and this kind of thought is what I want to elaborate in this article), but unlike my previous blog, in that article I returned to the two-interval search in some cases.
Let's look at the various computer algorithms, what they are doing, and how they are doing it. Obviously, a summary sentence is: A reasonable arrangement of what to do first, and then do what a sequence of actions. These sequences occur in the passage of one-dimensional time, although there are a lot of parallel algorithms, so that people look like time into a plane, but as long as these algorithms are CPU implementation, when they can not be decomposed, the algorithm is what to do, and then do what between the continuous decision-making. Two-point search, quick sort, aren't these all models? Take a closer look at the bubble sort, what to do first, what to do, and what to do ... Finally, the results are obtained. An action is a direct part of the problem. This is entirely in line with our human mind, because when we do anything, we are constantly making decisions about what we do first and what we do. This is the mathematics of the overall study.
The efficient equivalence scheme for hardware implementations works in a completely different way, more like the workings of our neural networks within our human brain. Since the interpretation of the workings of the brain is beyond my reach, even if I really understand it, I can't expect it to be clarified in a short essay that will end in a weekend, so I'll just say hardware.
Hardware work is more like spontaneous release of potential energy, the effect of this release is predetermined, fully automatic. For example, when the flood floods, the water flow along the gully scour the Earth, the effect depends on where high, where low, and because of this high and low difference, there will be some combination effect, such as first-class into two streams, in a low-lying place to merge again, which will double the impact of the water, thus crossing higher places. You can take this as a unite as one steeds. In a large-scale irrigation system, the pipes are in advance, the ditches are dug up, and then the water is flooded, and everything is done automatically, completely unattended. If you follow the way of the CPU, you must prepare some sequences-note that you do not dig ditches, then execute them sequentially, such as first watering zone A, and then watering area B, because D is closer to area B, then water d instead of zone C ... Of course, at a lower level, such as the concrete watering process, things are performed in a hardware way.
Although the CPU is always sequentially executing each instruction of a sequence, within the CPU, the way to execute each specific instruction is a process of releasing potential energy, and the CPU designer has already designed several general instruction circuits, The so-called RISC refers to the internal CPU circuit only to achieve a very simple and very basic instructions, and then rely on the external different combinations to form different programs, to accomplish different things. This is the nature of programming. For such things as DXR pro++ curing, in fact, it is not in accordance with the general idea of the program design, because it is the exact opposite of a process, I want to design is a steeds of potential energy release of the scheme, I want to do is to dig ditch fill, mountain, Instead of thinking about a plan to get to the destination on an established road.
The hardware is dead and the program is alive. Once the gully is determined, the effect of potential energy release is completely determined, so this circuit can no longer do it, but the program is free to change, because the CPU inside although also across the gully, but also dead, but they are more than the number, and each of the effect is very limited, Different effects can be formed by combining them in different ways. This situation involves a very important topic, that is the cost!
The cost of trenching is very high, it must be determined that the potential energy release effect of the gully is long-term and effective, otherwise wasted. and software can be a very low cost reorganization of the sequence, now programmers are not fast becoming a cheap labor? However, the performance of software and hardware direct wiring performance is not comparable, this is a compensatory game, sacrificing performance, resulting in flexibility. Today's programmers are almost always looking for the best algorithm in the framework of the CPU frame, because it is not their decision to use the hardware cabling directly, because it involves the cost problem, the money problem, must be a perfect tradeoff between the programmer's hiring cost and the investment cost.
In fact, has formed a so-called "programmable hardware", that is, the internal gully can be filled, and then re-dug ditch, that is, the hardware can be re-routed. The cost of this stuff is between pure cabling hardware and software. But one of the more significant things is the war between CISC and RISC, which in almost the battle to demarcate the boundaries of software and hardware continues to be a bitter duel of conspiracy an overt one, which is now out of the bounds of their borders, and unable to say exactly which faction a particular CPU is, Like the Roman Empire after the collapse of the national integration, as well as five random after the Chinese nation after the general. The Platonic classification is out of date, I just want to say.
Programmers on the CPU may think I'm a clown, to be honest I am, because I know not much language, whether it is natural language or computer language, computer language, I only know C,java and a little scripting language, C + + is I do not understand, PHP is I have never learned, Not to mention what Lisp,perl,go, Yi, D, .... , natural language, Putonghua generally, hometown of the dialect because left too long also almost only the theory of things, exchanges a bit, not to mention what many foreign languages. But if you want to follow the language, architecture, System classification, I belong to the kind of partial system (some people like a variety of programming languages and proficient in a lot, can be metaphysical to reveal the similarities and differences between these languages, design ideas, etc., this belongs to the language type, some people like to combine different components, they can be combined to build beautiful things, Although they are not in-depth understanding of each component, this is architectural, and there are a kind of people, such as me, like the depth of a particular field, and the breadth of the structure of the opposite, this is a system-type). I think, if a team in these three types of people each have one, that almost invincible, plus a work soy sauce, enough, drop Waxman month myth .... A little off-topic, write here, feel a bit like in the recruitment, also a bit like in the recommendation, more perhaps a little in the loading force, anyway, this article ended, family in the living room watching boring TV, I write boring articles in the bedroom.
The similarities and differences between hardware processing and software processing