Rocksolid Light

Welcome to Rocksolid Light

mail  files  register  newsreader  groups  login

Message-ID:  

Kleeneness is next to Godelness.


devel / comp.programming.threads / More of my philosophy about x86 CPUs and about cache prefetching and more of my thoughts..

SubjectAuthor
o More of my philosophy about x86 CPUs and about cache prefetching andAmine Moulay Ramdane

1
More of my philosophy about x86 CPUs and about cache prefetching and more of my thoughts..

<6d794862-5b3e-4891-954c-29b2b0b70fa4n@googlegroups.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=1048&group=comp.programming.threads#1048

  copy link   Newsgroups: comp.programming.threads
X-Received: by 2002:a5d:6484:0:b0:219:eb95:3502 with SMTP id o4-20020a5d6484000000b00219eb953502mr1924174wri.692.1655333927149;
Wed, 15 Jun 2022 15:58:47 -0700 (PDT)
X-Received: by 2002:ac8:7f8e:0:b0:304:f786:52f3 with SMTP id
z14-20020ac87f8e000000b00304f78652f3mr1632686qtj.473.1655333926942; Wed, 15
Jun 2022 15:58:46 -0700 (PDT)
Path: i2pn2.org!i2pn.org!aioe.org!news.uzoreto.com!2.eu.feeder.erje.net!feeder.erje.net!fdn.fr!proxad.net!feeder1-2.proxad.net!209.85.128.88.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.programming.threads
Date: Wed, 15 Jun 2022 15:58:46 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=173.178.84.155; posting-account=R-6XjwoAAACnHXTO3L-lyPW6wRsSmYW9
NNTP-Posting-Host: 173.178.84.155
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <6d794862-5b3e-4891-954c-29b2b0b70fa4n@googlegroups.com>
Subject: More of my philosophy about x86 CPUs and about cache prefetching and
more of my thoughts..
From: aminer68@gmail.com (Amine Moulay Ramdane)
Injection-Date: Wed, 15 Jun 2022 22:58:47 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: Amine Moulay Ramdane - Wed, 15 Jun 2022 22:58 UTC

Hello,

More of my philosophy about x86 CPUs and about cache prefetching and more of my thoughts..

I am a white arab, and i think i am smart since i have also
invented many scalable algorithms and algorithms..

I think i am highly smart and today i will talk about
the how to prefetch data into the caches on x86 microprocessors:

So here my following delphi and freepascal x86 inline assembler procedures that prefetch data into the caches:

So for 32 bit Delphi and Freepascal compilers, here is how to prefetch data into the level 1 cache and notice that, in delphi and freepascal compilers, when we pass the first parameter of the procedure with a register convention, it will be passed on CPU register eax of the x86 microprocessor:

procedure Prefetch(p : pointer); register;
asm
prefetchT1 byte ptr [eax]
end;

For 64 bit Delphi and Freepascal compilers, here is how to prefetch data into the level 1 cache and notice that, in delphi and freepascal compilers, when we pass the first parameter of the procedure with a register convention, it will be passed on CPU register rcx of the x86 microprocessor:

procedure Prefetch(p : pointer); register;
asm
prefetchT1 byte ptr [rcx]
end;

And you can also prefetch on level 0 and level 2 caches with the x86 assembler instruction prefetchT0 and prefetchT2, so just replace, in the above inline assembler procedures, prefetchT1 with prefetchT0 or prefetchT2, but i think i am highly smart and i say that notice that those prefetch x86 assembler instructions are used since also the microprocessor can be faster than memory, so then you have to understand that today, the story is much nicer, since the powerful x86 processor cores can all sustain many memory requests, and we call this process: "memory-level parallelism", and today x86 AMD or Intel processor cores could support more than 10 independent memory requests at a time, so for example Graviton 3 ARM CPU appears to sustain about 19 simultaneous memory loads per core against about 25 for the Intel processor, so then i think i can also say that this memory-level parallelism looks like using latency hiding so that to speed the things more so that the CPU doesn't wait too much for memory.

And now i invite you to read more of my thoughts about stack memory allocations and about preemptive and non-preemptive timesharing in the following web link:

https://groups.google.com/g/alt.culture.morocco/c/JuC4jar661w

And more of my philosophy about Stacktrace and more of my thoughts..

I think i am highly smart, and i say that there is advantages and disadvantages to portability in software programming , for example you can make your application run just in Windows operating system and it can be much more business friendly than making it run in multiple operating systems, since in business you have for example to develop and sell your application faster or much faster than the competition, so then we can not say that the tendency of C++ to requiring portability is a good thing.

Other than that i have just looked at Delphi and Freepascal and
i have just noticed that the Stacktrace in Freepascal is much more enhanced than Delphi, since look for example at the following application of Freepascal that has made Stacktrace portable to different operating systems and CPU architectures , and it is a much more enhanced stacktrace that is better than the Delphi ones that run just in Windows:

https://github.com/r3code/lazarus-exception-logger

But notice carefully that the Delphi ones run just in Windows:

https://docwiki.embarcadero.com/Libraries/Sydney/en/System.SysUtils.Exception.StackTrace

So i think that since a much more enhanced Stacktrace is important,
so i think that Delphi needs to provide us with a portable one to different operating systems and CPU architectures.

Also the Free Pascal Developer team is pleased to finally announce the addition of a long awaited feature, though to be precise it's two different, but very much related features: Function References and Anonymous Functions. These two features can be used independantly of each other, but their greatest power they unfold when used together.

Read about it here:

https://forum.lazarus.freepascal.org/index.php/topic,59468.msg443370.html#msg443370

More of my philosophy about my Winmenus using Wingraph and using CRT and more of my thoughts..

WinMenus using wingraph version 1.23

Author: Amine Moulay Ramdane

You can download my WinMenus using wingraph from my website here:

https://sites.google.com/site/scalable68/winmenus-using-wingraph

And you can download my Winmenus using CRT from here:

https://sites.google.com/site/scalable68/winmenus

I have implemented Winmenus using wingraph, this one is graphical, i have also included an OpenGL demo and other demos , just execute the real3d1.exe executable inside the zipfile to see how it is powerful.

Now it is both compatible with Delphi and with FreePascal, now it works with Delphi tokyo and above, but there is only one difference between Delphi and FreePascal, the double click with the left button of the mouse of freepascal is replaced in Delphi with a one click with the middle button of the mouse to avoid a problem.

Description:

Drop-Down Menu widget using the Wingraph unit. Please look at the real3d1.pas demo inside the zip file to know how to use it.

Use the 'Delete' on the keyboard to delete the items

Use the 'Insert' on the keyboard to insert the items

and use the 'Up' and 'Down' and 'PageUp and 'PageDown' on the keyboard to scroll ..

and use the 'Tab' on the keyboard to switch between the Drop Down Menus

and 'Enter' on the keyboard or mouse double click(for FreePascal) or middle mouse click(for Delphi) to select an item..

and the 'Esc' on the keyboard or right mouse click to exit..

and the 'F1' on keyboard to delete all the items from the list

and right arrow and left arrow to scroll on the left or on the right

You can search with SearchName() and NextSearch() methods and now the search with wildcards inside the Widget is working perfectly.

Winmenus is event driven, i have to explain it more to you to understand more...

At first you have to create your Widget menu by executing something like this:

Menu1:=TMenu.create(5,5);

This will create a Widget menu at the coordinate in characters (x,y) = (5,5)

After that you have to set your callbacks,cause my Winmenus is event driven, so you have to do it like this:

Menu1.SetCallbacks(insert,updown);

The SetCallbacks() method will set your callbacks, the first callback

is the callback that will be executed when the insert key is pressed and here above it is the "insert()" function, and the second callback is the callback that will be called when the up and down keys are pressed and here above it is the function "updown" , the remaining callbacks that you can assign are the following keys: Delete and F1 to F12.

After that you have to set your callback function, cause my Winmenus is event driven, so you have to add an item with AddItem() and set the callback function at the same time, like this:

AddItem('First 3D opengl demo',test1);

test1 will be the callback function.

When you execute execute(false) with a parameter equal to false my Winmenus widget will draw your menu without waiting for your input and events, when you set the parameter of the execute() method to true it will wait for your input and events, if the parameter of the execute method is true and the returned value of the execute method is ctTab that means you have pressed on the Tab key.. if the returned value is ctExit that means you have pressed on the Escape key to exit.

I have also included my Graph3D unit for 3D graphism that i have enhanced and that looks like graph unit of Turbo Pascal, and i have included GUI.pas unit that comes with more GUI components, please look at the demo.pas demo inside the zip file to know how to use my Winmenus unit and GUI unit to do GUI.

More explanation about my Graph3D unit that i have included inside the zipfile:

About the Graph3D unit, it looks like the Graph unit of turbo pascal but it's for 3D graphism, and to understand the variables Rho,Theta,Phi,DE of the InitProj() method of Graph3D unit, please read what's below:
When you run the demo program that is called cube3d.pas , here is the keys of the keyboard that permits you to run it:

Right arrow: to increase the angle Theta(that is the variable Theta) to move in the plane XY anti-clockwise.

Left arrow: to decrease the angle Theta(that is the variable Theta) to move in the plane XY clockwise.

Top arrow: to increase the Phi(that is variable Phi) angle to move up and look at the cube from above.

Bottom arrow: to decrease the Phi(that is variable Phi) angle to move down and look at the cube from below.

Key A: to decrease R(that is variable Rho) to get closer to the cube, we can even penetrate it and pass behind, in the latter case the image obtained will be the opposite.

Key E: to increase R(that is variable Rho) to move away from the cube.
Key +: to increase the distance D(that is variable DE) between the screen and the eye, this causes an enlargement of the image.

Key -: to decrease the distance D(that is variable DE) between the screen and the eye, this causes the image to shrink and possibly be an inverse magnification if D becomes negative, ie if the screen passes behind the observer.

Key C: to move from perspective projection to parallel projection and vice versa. During this toggle the parameters which were current are stored in auxiliary variables (RhoResp, DEResp for the perspective and RhoPara, DEPara for the parallel projection) in order to be able to return to it correctly afterwards.


Click here to read the complete article

devel / comp.programming.threads / More of my philosophy about x86 CPUs and about cache prefetching and more of my thoughts..

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor