>On Sun, 24 Aug 2025 17:14:21 -0400, Phil Smith III <li...@akphs.com> wrote:
> so 100,000 searches MIGHT do better on n,nnn separate x86 servers

>On Sun, 24 Aug 2025 15:15:41 +0100, Colin Paice <colinpai...@gmail.com> wrote:
>Sometimes the compilers are better than humans... 

Is your HLASM code more efficient than the same C code or any zLinux language? 
Phil asked the right question. Search (parsing) is the foundation of Linux. 
(e.g. HTML, strings, printf("ID\tName\n"), execute_sql("INSERT INTO users 
(name, age, email)"), programming languages and more). Searching is the 
lifeblood of Linux.

Ask yourself, why are unix commands so strange (e.g. testcmd -x -v -f aaa -u 
mmm -t bbb ccc -u). Why is uppercase/lowercase important to Unix? It's because 
of C limitations. In C, you strchr('-') or strchr(' '). Since you can't search 
for 2 different characters, you must structure the command in a known easily 
parsed syntax. 

Searching and parsing is stunningly fast using 1 z instruction. So how does TSO 
parse commands such as:

TSO ALloc DDN(abc) PATH('/u/user') DISP(NEW) catalog SPACE(1,1) 

You can't uppercase the command because of PATH requires lowercase. You use TRT 
CMD,TRT_TABLE where TRT_TABLE are the characters that represent parsing points.

NEXT_PARM    DC   256AL1(0)          default ignore all characters
                     ORG   C'('                    found (
                     DC      A(4)                  process as (
                     ORG   C'a'                    found a to i
                     DC      9A(8)                process as a character
                     ORG   C'A'                    found A to I
                     DC      9A(8)                process as a character
    ***** repeat for other parse points ******

                     ORG     *-4                  first address never used    
                     DS     0A  
NEXT_PARM_BRTABLE  DC   A(PROCESS_OPEN_PAREN)
                                  DC   A(PROCESS_CHARACTERS)
                                  DC   A(PROCESS_?????)      repeat for other 
parsing points defined in NEXT_PARM

1. Creating NEXT_PARM and calling TRT is only possible in C++ and GO but not C 
and other Unix languages.

2. It will not portable nor pretty in C++ but it's fast on z.

3. C and C++ are only portable when inefficient. 

4. Portable and efficient is only possible with a good macro language.  
Currently, there is no path forward to fix Linux programs and zLInux is doomed 
to be efficient.

5. There might be an x86 vector instruction which could do like this but that 
would require C changes to create the character search table and a new stdlib 
function for TRT.

6. Linux is designed using C. MS Windows is designed using x86 instructions 
through MSVC. z/OS is designed around z instructions.

For Google, is n,nnn Linux or zLinux servers a better choice despite both being 
extremely inefficient? The question is which is far worse? Why hasn't Google 
invested in innovative computers instead of buying junk computers? Why doesn't 
GO have a macro language to make it portable? It's only 15 years old and didn't 
learn a thing.

So are you more effective in HLASM or a compiled language? If we base the 
decision on the strength of the operating system, then HLASM is the clear 
winner despite not having an optimizer.

Reply via email to