Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > sci.physics > #532441 > unrolled thread

Scalar and Vector Product Code

Started byFabian Russell <root@localhost.localdomain>
First post2015-11-12 20:30 +0000
Last post2015-11-13 02:11 +0000
Articles 20 on this page of 26 — 7 participants

Back to article view | Back to sci.physics


Contents

  Scalar and Vector Product Code Fabian Russell <root@localhost.localdomain> - 2015-11-12 20:30 +0000
    Re: Scalar and Vector Product Code jimp@specsol.spam.sux.com - 2015-11-12 20:40 +0000
      Re: Scalar and Vector Product Code Fabian Russell <root@localhost.localdomain> - 2015-11-12 21:03 +0000
        Re: Scalar and Vector Product Code Sam Wormley <swormley1@gmail.com> - 2015-11-12 15:58 -0600
          Re: Scalar and Vector Product Code Fabian Russell <root@localhost.localdomain> - 2015-11-12 22:34 +0000
        Re: Scalar and Vector Product Code jimp@specsol.spam.sux.com - 2015-11-12 21:54 +0000
          Re: Scalar and Vector Product Code Fabian Russell <root@localhost.localdomain> - 2015-11-12 22:31 +0000
            Re: Scalar and Vector Product Code jimp@specsol.spam.sux.com - 2015-11-12 23:08 +0000
              Re: Scalar and Vector Product Code Fabian Russell <root@localhost.localdomain> - 2015-11-12 23:27 +0000
    Re: Scalar and Vector Product Code Poutnik <poutnik4nntp@gmail.com> - 2015-11-12 21:55 +0100
      Re: Scalar and Vector Product Code Fabian Russell <root@localhost.localdomain> - 2015-11-12 21:07 +0000
        Re: Scalar and Vector Product Code jimp@specsol.spam.sux.com - 2015-11-12 21:59 +0000
          Re: Scalar and Vector Product Code Fabian Russell <root@localhost.localdomain> - 2015-11-12 22:36 +0000
          Re: Scalar and Vector Product Code Fabian Russell <root@localhost.localdomain> - 2015-11-12 22:53 +0000
            Re: Scalar and Vector Product Code jimp@specsol.spam.sux.com - 2015-11-12 23:17 +0000
              Re: Scalar and Vector Product Code Fabian Russell <root@localhost.localdomain> - 2015-11-12 23:47 +0000
                Re: Scalar and Vector Product Code jimp@specsol.spam.sux.com - 2015-11-13 00:21 +0000
                  Re: Scalar and Vector Product Code Fabian Russell <root@localhost.localdomain> - 2015-11-13 00:46 +0000
                    Re: Scalar and Vector Product Code jimp@specsol.spam.sux.com - 2015-11-13 01:04 +0000
                      Re: Scalar and Vector Product Code Fabian Russell <root@localhost.localdomain> - 2015-11-13 01:39 +0000
      dot product noTthaTguY <abu.kuanysh05@gmail.com> - 2015-11-13 13:41 -0800
    Re: Scalar and Vector Product Code Double-A <double-a3@hush.com> - 2015-11-12 15:01 -0800
      Re: Scalar and Vector Product Code Fabian Russell <root@localhost.localdomain> - 2015-11-12 23:36 +0000
    Re: Scalar and Vector Product Code gilber34 <fafa@invalid.com> - 2015-11-12 19:07 -0600
      Re: Scalar and Vector Product Code Fabian Russell <root@localhost.localdomain> - 2015-11-13 01:51 +0000
        Re: Scalar and Vector Product Code jimp@specsol.spam.sux.com - 2015-11-13 02:11 +0000

Page 1 of 2  [1] 2  Next page →


#532441 — Scalar and Vector Product Code

FromFabian Russell <root@localhost.localdomain>
Date2015-11-12 20:30 +0000
SubjectScalar and Vector Product Code
Message-ID<pan.2015.11.12.20.30.07@localhost.localdomain>
Greetings physics enthusiasts,

The scalar and vector products are fundamental operations
in physics and every physicist worth his salt should know
how to fully implement them.

Your task is to write assembly language code using the 
Intel x64 SIMD instruction set to calculate both the scalar
and vector products.

Now, in the latest Core 2 processors, Intel has already
introduced an actual instruction for the scalar product,
but write one anyway using independent SSE or AVX code.

Also, in addition to assembly code using SIMD, write the
same routines in 387 instructions to exploit extended
precision.

All those who cannot accomplish this task should consider
themselves pathetic throwbacks to ancient times.

To all those whose first reaction to all of this will be
to proclaim irrelevance I will only say: "Fsck you, ginger
lickers!"

[toc] | [next] | [standalone]


#532445

Fromjimp@specsol.spam.sux.com
Date2015-11-12 20:40 +0000
Message-ID<a2afhc-a93.ln1@mail.specsol.com>
In reply to#532441
Fabian Russell <root@localhost.localdomain> wrote:
> Greetings physics enthusiasts,
> 
> The scalar and vector products are fundamental operations
> in physics and every physicist worth his salt should know
> how to fully implement them.
> 
> Your task is to write assembly language code using the 
> Intel x64 SIMD instruction set to calculate both the scalar
> and vector products.
> 
> Now, in the latest Core 2 processors, Intel has already
> introduced an actual instruction for the scalar product,
> but write one anyway using independent SSE or AVX code.
> 
> Also, in addition to assembly code using SIMD, write the
> same routines in 387 instructions to exploit extended
> precision.
> 
> All those who cannot accomplish this task should consider
> themselves pathetic throwbacks to ancient times.
 
Anyone who thinks that in 2015 one has to program in assembly rather
trivial algorithms that are present in most math libraries today
is a pathetic throwback to ancient times.

Such optimized functions have been available in FORTRAN libraries
for at least 40 years.



-- 
Jim Pennino

[toc] | [prev] | [next] | [standalone]


#532453

FromFabian Russell <root@localhost.localdomain>
Date2015-11-12 21:03 +0000
Message-ID<pan.2015.11.12.21.01.43@localhost.localdomain>
In reply to#532445
On Thu, 12 Nov 2015 20:40:10 +0000, jimp wrote:

>  
> Anyone who thinks that in 2015 one has to program in assembly
>

Nothing could be further from the truth.

There is no magic in 2015.  The fastest and most efficient code
can ONLY be created in assembly language.  It will beat
ANYTHING hands down.

Now he will claim that speed is irrelevant.

Tell that to anyone languishing at the air terminals.

[toc] | [prev] | [next] | [standalone]


#532483

FromSam Wormley <swormley1@gmail.com>
Date2015-11-12 15:58 -0600
Message-ID<CsydnaYIGcUfltjLnZ2dnUU7-KmdnZ2d@giganews.com>
In reply to#532453
On 11/12/15 3:03 PM, Fabian Russell wrote:
> The fastest and most efficient code can ONLY be created in assembly
> language.  It will beat ANYTHING hands down.


   The tens of thousands of developer that have created more than a
   million applications for mobile devices (iOS and Android) didn't get
   the memo. A couple billion mobile devices running code that is not
   written in assembly language. Time to get real Russell.



-- 

sci.physics is an unmoderated newsgroup dedicated
to the discussion of physics, news from the physics
community, and physics-related social issues.

[toc] | [prev] | [next] | [standalone]


#532508

FromFabian Russell <root@localhost.localdomain>
Date2015-11-12 22:34 +0000
Message-ID<pan.2015.11.12.22.34.04@localhost.localdomain>
In reply to#532483
On Thu, 12 Nov 2015 15:58:26 -0600, Sam Wormley wrote:

> 
>    The tens of thousands of developer that have created more than a
>    million applications for mobile devices (iOS and Android) didn't get
>    the memo. A couple billion mobile devices running code that is not
>    written in assembly language. Time to get real Russell.


You do things your way, Sambo, and I'll do them my way --

-- and I'll get to Tuscaloosa a lot better and quicker.

[toc] | [prev] | [next] | [standalone]


#532485

Fromjimp@specsol.spam.sux.com
Date2015-11-12 21:54 +0000
Message-ID<ieefhc-mj3.ln1@mail.specsol.com>
In reply to#532453
Fabian Russell <root@localhost.localdomain> wrote:
> On Thu, 12 Nov 2015 20:40:10 +0000, jimp wrote:
> 
>>  
>> Anyone who thinks that in 2015 one has to program in assembly
>>
> 
> Nothing could be further from the truth.
> 
> There is no magic in 2015.  The fastest and most efficient code
> can ONLY be created in assembly language.  It will beat
> ANYTHING hands down.

That is a very spacious claim at best.

A modern optimizing compiler can create code in a very small fraction 
of the time it takes to create hand optimized assemply code with a
run time performance difference that is at best trivial.

Add threading to that to take advantage of parallel processing and
hand assembly coding is just ludicrous.

Where have you been for the last 40 to 50 years?


-- 
Jim Pennino

[toc] | [prev] | [next] | [standalone]


#532507

FromFabian Russell <root@localhost.localdomain>
Date2015-11-12 22:31 +0000
Message-ID<pan.2015.11.12.22.31.37@localhost.localdomain>
In reply to#532485
On Thu, 12 Nov 2015 21:54:58 +0000, jimp wrote:

> 
> That is a very spacious claim at best.
> 

Only to someone who has obtained his computing knowledge
through second hand reports and has no direct experience
in programming.

>
> A modern optimizing compiler can create code in a very small fraction 
> of the time it takes to create hand optimized assemply code with a
> run time performance difference that is at best trivial.
> 

Only to someone who has obtained his computing knowledge
through second hand reports and has no direct experience
in programming.

>
> Add threading to that to take advantage of parallel processing and
> hand assembly coding is just ludicrous.
> 

Only to someone who has obtained his computing knowledge
through second-hand reports and has no direct experience
in programming.


>
> Where have you been for the last 40 to 50 years?
>

Far, far, away from where you have been.  Thank God.

[toc] | [prev] | [next] | [standalone]


#532528

Fromjimp@specsol.spam.sux.com
Date2015-11-12 23:08 +0000
Message-ID<foifhc-384.ln1@mail.specsol.com>
In reply to#532507
Fabian Russell <root@localhost.localdomain> wrote:
> On Thu, 12 Nov 2015 21:54:58 +0000, jimp wrote:
> 
>> 
>> That is a very spacious claim at best.
>> 
> 
> Only to someone who has obtained his computing knowledge
> through second hand reports and has no direct experience
> in programming.

An ad hominum due to your lack of ability to to substantiate your
kook statements.


-- 
Jim Pennino

[toc] | [prev] | [next] | [standalone]


#532535

FromFabian Russell <root@localhost.localdomain>
Date2015-11-12 23:27 +0000
Message-ID<pan.2015.11.12.23.27.05@localhost.localdomain>
In reply to#532528
On Thu, 12 Nov 2015 23:08:31 +0000, jimp wrote:

> 
> An ad hominum due to ...
>

No, it's not, because you are not a "hominem."

Ha, ha, ha, ha!

[toc] | [prev] | [next] | [standalone]


#532450

FromPoutnik <poutnik4nntp@gmail.com>
Date2015-11-12 21:55 +0100
Message-ID<n22u7t$bf8$1@dont-email.me>
In reply to#532441
Dne 12/11/2015 v 21:30 Fabian Russell napsal(a):
> Greetings physics enthusiasts,
> 
> The scalar and vector products are fundamental operations
> in physics and every physicist worth his salt should know
> how to fully implement them.
> 

It is very funny idea.

You may as well want next time physicists should be able
to implement sin, atan, exp and ln functions
by the Czebyshev ortogonal polynom approximation.

-- 
Poutnik ( the Czech word for a wanderer )

Knowledge makes great men humble, but small men arrogant.

[toc] | [prev] | [next] | [standalone]


#532456

FromFabian Russell <root@localhost.localdomain>
Date2015-11-12 21:07 +0000
Message-ID<pan.2015.11.12.21.05.30@localhost.localdomain>
In reply to#532450
On Thu, 12 Nov 2015 21:55:34 +0100, Poutnik wrote:

> 
> You may as well want next time physicists should be able
> to implement sin, atan, exp and ln functions
> by the Czebyshev ortogonal polynom approximation.
>

All the trig functions require ARGUMENT REDUCTION in software
before a direct hardware calculation can be performed.

Anyone who does not use assembly language for argument reduction
is kicking himself in the ass. 

[toc] | [prev] | [next] | [standalone]


#532486

Fromjimp@specsol.spam.sux.com
Date2015-11-12 21:59 +0000
Message-ID<8nefhc-mj3.ln1@mail.specsol.com>
In reply to#532456
Fabian Russell <root@localhost.localdomain> wrote:
> On Thu, 12 Nov 2015 21:55:34 +0100, Poutnik wrote:
> 
>> 
>> You may as well want next time physicists should be able
>> to implement sin, atan, exp and ln functions
>> by the Czebyshev ortogonal polynom approximation.
>>
> 
> All the trig functions require ARGUMENT REDUCTION in software
> before a direct hardware calculation can be performed.
> 
> Anyone who does not use assembly language for argument reduction
> is kicking himself in the ass. 

Anyone coding in assembly language to solve numerical problems is wasting
time that could have been spent by a CPU doing calculations. 

In the days of 16 core, 8 Ghz or better processors, there are few problems
that require optimized code to the microsecond of execution time.


-- 
Jim Pennino

[toc] | [prev] | [next] | [standalone]


#532509

FromFabian Russell <root@localhost.localdomain>
Date2015-11-12 22:36 +0000
Message-ID<pan.2015.11.12.22.36.39@localhost.localdomain>
In reply to#532486
On Thu, 12 Nov 2015 21:59:36 +0000, jimp wrote:

> 
> Anyone coding in assembly language ... [snip]
>

That response is completely canned.  You may as well be
an answering machine.

I just hit "Delete."

[toc] | [prev] | [next] | [standalone]


#532515

FromFabian Russell <root@localhost.localdomain>
Date2015-11-12 22:53 +0000
Message-ID<pan.2015.11.12.22.53.55@localhost.localdomain>
In reply to#532486
On Thu, 12 Nov 2015 21:59:36 +0000, jimp wrote:

> 
> there are few problems
> that require optimized code to the microsecond of execution time.
>

There are many more than you would think -- and not microseconds
either but NANOSECONDS.

Ever hear of an FPGA?  Your compiled shit couldn't compete.

[toc] | [prev] | [next] | [standalone]


#532537

Fromjimp@specsol.spam.sux.com
Date2015-11-12 23:17 +0000
Message-ID<29jfhc-384.ln1@mail.specsol.com>
In reply to#532515
Fabian Russell <root@localhost.localdomain> wrote:
> On Thu, 12 Nov 2015 21:59:36 +0000, jimp wrote:
> 
>> 
>> there are few problems
>> that require optimized code to the microsecond of execution time.
>>
> 
> There are many more than you would think -- and not microseconds
> either but NANOSECONDS.
> 
> Ever hear of an FPGA?  Your compiled shit couldn't compete.
 
Yes, and that has nothing to do with the topic at hand.

FYI real time programming to the nanosecond level was being done in
the 70's with FORTRAN.

But that is off subject for the topic at hand, i.e. program execution
times.

I say again, there are few problems where the total execution time
would be improved to by any practical degree by hand coded assembly.

Note the word 'practical', as in in would make any difference to
anybody in the real world.

Nobody would care if, for example, their huge circuit simulation program,
which does an immense amount of floating point calculations, finishes
in 5 minutes 10 seconds versus 5 minutes 40 seconds.


-- 
Jim Pennino

[toc] | [prev] | [next] | [standalone]


#532551

FromFabian Russell <root@localhost.localdomain>
Date2015-11-12 23:47 +0000
Message-ID<pan.2015.11.12.23.47.46@localhost.localdomain>
In reply to#532537
On Thu, 12 Nov 2015 23:17:22 +0000, jimp wrote:

> 
> I say again, there are few problems where the total execution time
> would be improved to by any practical degree by hand coded assembly.
> 

It's being done all over as we speak.

Off the top of my head, two examples would be the X Window
server in Linux and the Gnu Multiple Precision libraries.
Both of these applications use much assembly language coding
expressly for speed and both are in widespread distribution.

They are doubtless a LOT more examples if I would care to
look, but I won't.

[toc] | [prev] | [next] | [standalone]


#532564

Fromjimp@specsol.spam.sux.com
Date2015-11-13 00:21 +0000
Message-ID<p0nfhc-bl4.ln1@mail.specsol.com>
In reply to#532551
Fabian Russell <root@localhost.localdomain> wrote:
> On Thu, 12 Nov 2015 23:17:22 +0000, jimp wrote:
> 
>> 
>> I say again, there are few problems where the total execution time
>> would be improved to by any practical degree by hand coded assembly.
>> 
> 
> It's being done all over as we speak.

Nope; all that ended decades ago.

> Off the top of my head, two examples would be the X Window
> server in Linux

Nope, that is C.

> and the Gnu Multiple Precision libraries.

As you were wrong about the X server, I'm not bothering to look at
this source.

> Both of these applications

X server could be called an application, but Gnu Multiple Precision
libraries are, as the name says, libraries.

Do you understand the difference between an application and a library?

> They are doubtless a LOT more examples if I would care to
> look, but I won't.

Don't waste your time; they don't exist.

People gave up on applications in assembly years ago.
 

-- 
Jim Pennino

[toc] | [prev] | [next] | [standalone]


#532574

FromFabian Russell <root@localhost.localdomain>
Date2015-11-13 00:46 +0000
Message-ID<pan.2015.11.13.00.46.23@localhost.localdomain>
In reply to#532564
On Fri, 13 Nov 2015 00:21:13 +0000, jimp wrote:

> 
> [snip extremely putrid shit]
>

You don't know what the fsck you're talking about.

Try telling that shit to other people and they'll quietly
walk away as if you were a twisted schizo.

You are twisted schizo.

Dream away.  That's all you've got.

[toc] | [prev] | [next] | [standalone]


#532581

Fromjimp@specsol.spam.sux.com
Date2015-11-13 01:04 +0000
Message-ID<nipfhc-2v4.ln1@mail.specsol.com>
In reply to#532574
Fabian Russell <root@localhost.localdomain> wrote:
> On Fri, 13 Nov 2015 00:21:13 +0000, jimp wrote:
> 
>> 
>> [snip extremely putrid shit]
>>
> 
> You don't know what the fsck you're talking about.

Yeah, right.

I had remembered the the X server source was C from the last time
I compiled it about 20 years ago, but just in case something had
changed I downloaded it to make sure you were as full of shit as
you sound.

Yep, you are full of shit.


-- 
Jim Pennino

[toc] | [prev] | [next] | [standalone]


#532587

FromFabian Russell <root@localhost.localdomain>
Date2015-11-13 01:39 +0000
Message-ID<pan.2015.11.13.01.37.50@localhost.localdomain>
In reply to#532581
On Fri, 13 Nov 2015 01:04:55 +0000, jimp wrote:

> 
> Yep, you are full of shit.
>

That's not shit, that's gray matter.

[toc] | [prev] | [next] | [standalone]


Page 1 of 2  [1] 2  Next page →

Back to top | Article view | sci.physics


csiph-web