05 April 2022, 12:06 | #141 |
Registered User
Join Date: Dec 2020
Location: Philippines
Posts: 45
|
About compiler vs hand-code assembly in x86, this might be interesting to some of you http://www.codersnotes.com/notes/beating-the-compiler/
|
05 April 2022, 12:24 | #142 |
Registered User
Join Date: Aug 2014
Location: Netherlands
Posts: 698
|
of course, we are talking about optimizing code for a 060 or 080 chip here. But these are all "microcontroller" class cpu's in today's world.
Does anyone know Lofar? operated by Astron in the Netherlands? LOFAR is basically a very big phased array radio telescope. At the core is an IBM Blue Gene/P supercomputer. And the core functions in this machine are programmed in assembler : (see last 2 paragraphs of section 2: https://www.astron.nl/~romein/papers...S-11/lofar.pdf They claim their assembly code is often an order of magnitude faster than C++ code. |
05 April 2022, 13:03 | #143 | |||||
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,326
|
Quote:
But alas for you, this is irrelevant. Your code after compilation will have to run on a variety of devices, not all having same cpu model of course. So compiled code is hardly ever targeted at anything but "generic" model ; in addition compilers can't support all of them due they are just too numerous (guess what, VS2015 does not list my Intel Core i7 4710Hq in available targets). Quote:
You also missed that an important point for a new cpu to have success in the market is its ability to faster run existing code. Quote:
What is exact syntax ? Any online doc i can check for this ? Quote:
It is not bias, it is experience. Of course by studying very small code you're doing cherry picking - and it's not as if i hadn't already written that the bigger the program is, the worse it becomes. Quote:
|
|||||
05 April 2022, 13:08 | #144 | |
Registered User
Join Date: Sep 2013
Location: Poland
Posts: 834
|
@Mathesar - ARM Cortex M processors go up to several hundred of MHz so even if they didn't have as good execution stage (which I believe newest Cortex M do) they would obviously outperform AC68080 due to sheer frequency difference. And yes. Those do have FPU and SIMD as well.
And be mindful of what article presented by BeamCoder had in a summary Quote:
|
|
05 April 2022, 13:16 | #145 | |
Registered User
Join Date: Mar 2018
Location: Hastings, New Zealand
Posts: 2,610
|
Quote:
When programming for the Amiga we need to produce 68k code one way or another. Some of us are so fluent in 68k assembler that we find it easier and more enjoyable than C for the stuff we are doing. "Oh, but it's not serious stuff", you say. The computer gaming industry was worth over $200 billion last year, which is pretty serious money. But people aren't playing computer games to be serious - we do it for fun, which is what makes our lives worth living. My neighbor spends most of her time watching sport on TV, while I spend my time programming my Amiga in assembler. Try to dismiss either of our choices and you will get the same response - you will not tell us how we should be enjoying life. Any talk about what MCU or PC architecture is 'it' today is irrelevant, as is how efficient the compilers made for them might be. Those of us who program in assembler for the Amiga need a CPU that runs 68k code. Apollo accelerators give us that. Of course we want them to be nice and fast, and we may indulge in comparisons with other CPUs like x86 and ARM for laughs, but in the end it is writing beautiful 68k code that makes us happy. Telling us that ARM or x86 systems are much more powerful etc. is pointless. We know that, and we don't care - just like I don't care that my neighbor 'wastes' the remaining days of her life watching golf on TV. If that's what makes her happy then it's perfectly valid. If I want to 'waste' my time programming in 68k assembler for a 25 year old home computer, that's equally valid. We came here to discuss exciting new Amiga developments, not get into yet another stupid debate about how it stacks up against modern systems. If that's what we were interested in we wouldn't be here. |
|
05 April 2022, 13:23 | #146 | |
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,326
|
Quote:
I only assumed it's not worth the effort on x86 and perfectly doable on 68k. |
|
05 April 2022, 13:24 | #147 |
Registered User
Join Date: Mar 2018
Location: Hastings, New Zealand
Posts: 2,610
|
This is what I love about C compilers - not.
|
05 April 2022, 13:28 | #148 | |
Returning fan!
Join Date: Jan 2011
Location: Montréal, QC, Canada
Posts: 1,434
|
Quote:
|
|
05 April 2022, 13:50 | #149 | ||
Registered User
Join Date: Mar 2018
Location: Hastings, New Zealand
Posts: 2,610
|
Quote:
Quote:
|
||
05 April 2022, 13:58 | #150 | |
Registered User
Join Date: Aug 2014
Location: Netherlands
Posts: 698
|
Quote:
I am sure LOFAR's efforts had to do with SIMD instruction to get the most out of the FPU. And that is one niche where assembler might be beneficial. |
|
05 April 2022, 14:00 | #151 | |||||
Registered User
Join Date: Nov 2018
Location: Germany
Posts: 110
|
Quote:
Quote:
Quote:
Quote:
Quote:
|
|||||
05 April 2022, 14:18 | #152 | |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,502
|
Quote:
I already wanted to write something similar. Most of the discussion here is absolutely pointless and I wonder what your intentions are, being registered to an Amiga forum? Amiga developers have fun working with the limitations of their hardware. And for that the code size, CPU and assembly-level optimizations are certainly a part of it. BTW, I cannot believe that anybody who is objective enough (so neither nonarkitten, nor meynaf, nor me), would think the x86 ISA is better than m68k. |
|
05 April 2022, 14:28 | #153 | |||||
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,326
|
Quote:
Besides, writing cpu specific code makes implementation visible in the programming model - which is something i don't want to do. Quote:
Quote:
Quote:
Quote:
Some coders do that, but not me. I prefer being modular and use adaptative register allocation. |
|||||
05 April 2022, 14:30 | #154 |
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,326
|
|
05 April 2022, 17:55 | #155 | |||||||||||
Registered User
Join Date: Jan 2019
Location: Germany
Posts: 3,241
|
Quote:
Quote:
Quote:
Quote:
How large a project goes is not on you. It is on the requirements of the product owner what the project should do. Is AmigaOs large, for example? Probably not by today's standards, but it is large enough for not wasting everybodies time with assembler. Quote:
If that's all such a waste, why are you wasting your time with the waste? Quote:
Quote:
Quote:
Code:
move.l d0,d2 Quote:
In assembler: Nobody warns you whatsoever for the above code if d0 can be negative, but d2 is a count can must be non-negative. Nothing happens. Either you know, or you shoot yourself in the foot. In which way this is any better I do not know. Quote:
Quote:
That's why I'm reading the code the compiler generates for me, and then potentially tune it. I'm not writing this stuff by hand anymore. Compilers today can do auto-vectorization, loop unrolling, flow analysis and other neat tricks, and there have been cases where hand-optimizing the code went nowhere because the compiler just knew better what's fast and what isn't. |
|||||||||||
05 April 2022, 19:21 | #156 | ||||||||||||||||
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,326
|
Quote:
Quote:
Quote:
As i suppose there is no 68k version of your JPEG XS, you're comparing apples and oranges. Quote:
Quote:
Quote:
Quote:
Yeah, that very same "sane" software that adds bogus newlines in your posts here (and you don't appear to care about). Quote:
Quote:
Quote:
Quote:
And no, it's not a type conversion. It's a longword and remains a longword. Quote:
In asm, otoh, you write different instruction. You write blo for unsigned, blt for signed. Mere "<" is misleading. Quote:
Worse, C codes declares signed overflow as undefined ! Quote:
Yeah, toy code. This has become your motto here. But toy code is at least nice and enjoyable. Quote:
Quote:
|
||||||||||||||||
05 April 2022, 19:33 | #157 |
Registered User
Join Date: Dec 2019
Location: Ur, Atlantis
Posts: 1,940
|
Alright guys, if I have to hit PageDown 3 times to get through just one reply it's probably time to let go.
|
05 April 2022, 20:20 | #158 | |||
Registered User
Join Date: May 2017
Location: Munich/Bavaria
Posts: 2,319
|
A site that discusses not only hobby projects, but also e.g. new releases of the operating system and commercial releases of games.
This site is clearly not opposed to larger more professional projects, even if these are rare now. Quote:
There is AROS and UAE on very modern machines and there is AmigaOS4 and MorphOS on middle-aged machines. Quote:
Quote:
The Retrogaming section is about "retro-gaming world in general." And games for all kinds of platforms are discussed there. And there is a "Coders. Nextgen" section for "Develop for the sequels: PowerPC Amigas, AROS, Amithlon..." The only thing that is probably really OT is a discussion High Language vs. Assembly in an announcement about a new 3D-FPGA-unit in the News section |
|||
05 April 2022, 20:31 | #159 | |||
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,326
|
Quote:
Quote:
This has nothing to do with the point in question. Quote:
Tell that to the other guy, not me. |
|||
05 April 2022, 20:45 | #160 | |||
Registered User
Join Date: Sep 2013
Location: Poland
Posts: 834
|
@meynaf
Quote:
Quote:
Quote:
And HLL isn't only about abstraction layer and portability. It's also about efficiency, convenience etc. |
|||
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Apollo 1240 missing Mach chip | Benfromnorway | MarketPlace | 3 | 01 June 2016 21:53 |
Apollo 1240@25mhz + 32mb Ram (Mach131 chip so can be upgraded to 060) | fitzsteve | MarketPlace | 4 | 16 August 2010 19:01 |
Gauging interest: Amiga 600HD, Apollo 620, 2MB Chip, 8MB Fast | chiark | MarketPlace | 9 | 25 November 2009 20:18 |
Wanted: MACH131 chip from Apollo 040 or 060 | 8bitbubsy | MarketPlace | 8 | 29 October 2009 15:55 |
Cedric and the lost scepture Demo/Preview-Version | mai | request.Old Rare Games | 3 | 28 March 2008 16:27 |
|
|