03 August 2015, 00:53 | #201 |
Computer Nerd
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 47
Posts: 3,751
|
Fixed size with collisions and a simple hash algorithm. In C that's not complex at all, while it's already very effective.
|
03 August 2015, 07:07 | #202 | |||
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
|
Quote:
Quote:
All normal images are shown ; only malformed files will be rejected. And, yes, someone here may try to inject code in an image to take control of the machine, using an exploit in my code There is certainly free code available to decode these (this is where you will see that it's not as efficient as it looks ). Quote:
|
|||
03 August 2015, 07:10 | #203 |
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
|
|
03 August 2015, 09:15 | #204 |
Computer Nerd
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 47
Posts: 3,751
|
|
03 August 2015, 11:50 | #205 |
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
|
|
03 August 2015, 11:59 | #206 |
Glastonbridge Software
Join Date: Jan 2012
Location: Edinburgh/Scotland
Posts: 2,243
|
"simple" hash table, vs hash table with full functionality in C++ stl...
https://gcc.gnu.org/onlinedocs/libst...le-source.html *eyes bleed* If C is slower than Asm then you definitely want to be using an efficient algorithm! |
03 August 2015, 12:45 | #207 |
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
|
|
03 August 2015, 12:47 | #208 |
Glastonbridge Software
Join Date: Jan 2012
Location: Edinburgh/Scotland
Posts: 2,243
|
|
03 August 2015, 12:57 | #209 |
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
|
|
03 August 2015, 12:59 | #210 |
Registered User
Join Date: May 2014
Location: inside the emulator
Posts: 377
|
LOL! As an assembly coding fan I must remind you that current compilers are very good and often produce much better code than assembly language programmers. Assembly can still be faster but require a good programmer, a limited problem and a lot of time compared to higher level languages.
|
03 August 2015, 13:03 | #211 |
Glastonbridge Software
Join Date: Jan 2012
Location: Edinburgh/Scotland
Posts: 2,243
|
Assembly might be faster than C (i don't even care if it is or not, let alone by how much) but the idea that if you're writing in C you wouldn't want to use a fast algorithm instead of a slow one is just so wat i don't even
|
03 August 2015, 13:06 | #212 | |
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
|
Quote:
When I wrote my FLaC decoder it was 4 times faster than its C counterpart (GCC compile). Just an example among many. |
|
03 August 2015, 13:38 | #213 | |||
Registered User
Join Date: May 2014
Location: inside the emulator
Posts: 377
|
Quote:
Quote:
The specific combination of blitter, copper, paula? If so it is severely outdated. The copper have no use at all in a modern display system. The blitter is too limited and to slow for modern systems and the paula really isn't much either. The combination of them did provide good performance for a consumer system at the time - that's all. Or do you mean the use of coprocessors? If so a current modern system have more coprocessors with much more power than the Amiga design. The GPU can do things Amiga programmers could only dream about. Quote:
|
|||
03 August 2015, 13:45 | #214 | |
Registered User
Join Date: May 2014
Location: inside the emulator
Posts: 377
|
Quote:
A 4x difference without changing the algorithm sound suspicious. Edit: Let me guess: your compiler of choice doesn't support 64 bit values well and you require them extensively in order to avoid precision losses? Last edited by Megol; 03 August 2015 at 13:51. |
|
03 August 2015, 13:58 | #215 | |
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
|
Quote:
However if you pretend that a compiler can make 68k code that can beat mine, i'll just laugh Huh, no. |
|
03 August 2015, 14:26 | #216 |
Glastonbridge Software
Join Date: Jan 2012
Location: Edinburgh/Scotland
Posts: 2,243
|
i had to go for a long walk before writing this reply.
it is as if everything i have said about algorithmic time complexity has just gone down a black hole. i said that a lot of problems in modern code are caused by programmers not understanding it, well it seems that old-timer asm coders don't understand it either. They know a hash map is "fast" but that's about it. Maybe hand-coded asm (by an expert) is 4 times faster (i remember reading the figure 3 times faster on average, elsewhere) but let's just say 10 times for simplicity. In any case, it is a more-or-less constant factor for any given compiler. The point is, you could write the most efficient bubble sort ever in hand-coded asm, but even a crudely implemented quick sort written in AMOS Basic would still outperform it given a sufficiently large input. The choice of algorithm makes far more difference than the choice of language for all but fairly trivial operations. Asm might be ten times faster than any given language, but an O(n log n) algorithm might be hundreds, thousands, even millions of times faster than a naive O(n^2) algorithm, for the size of data sets you are dealing with. Well then you would say, if you wrote the quick sort in asm it would be ever faster still. And you'd be right. But the user really doesn't care if he gets his result in a tenth of a second or a hundredth of a second, but he sure as hell doesn't want to have to wait ten minutes. Of course we care about speed, but performance isn't the only consideration. There are other priorities too, such as development time, portability, maintainability, and of course being able to hire people who can actually do it. |
03 August 2015, 14:33 | #217 | |||
Registered User
Join Date: May 2014
Location: inside the emulator
Posts: 377
|
Quote:
Quote:
Quote:
|
|||
03 August 2015, 14:47 | #218 | |||
Registered User
Join Date: May 2014
Location: inside the emulator
Posts: 377
|
Quote:
The solution to those problem is in most cases inline assembly code or using intrinsics. In the general case what causes compilers to be slower is rigid calling conventions. Quote:
Quote:
Strictly speaking assembly can be faster than higher level languages (but not generally) but for most problems runtime generated machine code is the fastest. But that's even messier. |
|||
03 August 2015, 14:48 | #219 | |
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
|
Quote:
I can write asm faster than many people write C (or java, or anything else). Yes. When i change the algorithm itself, you can expect even bigger gains (i got a routine 14x faster in my heroes2 port, in the editor). As an example, take my picture viewer (aga only). You will never ever find a compiler that can just approach its speed. Actually it might even beat x86-compiled native code on the same machine when ran under winuae's jit. http://meynaf.free.fr/pr/mv.lzx |
|
03 August 2015, 15:03 | #220 | ||
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
|
Quote:
Quote:
Never said otherwise. |
||
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Amiga 1200 computer | sidrulez! | MarketPlace | 4 | 01 January 2015 23:36 |
looking for my amiga 3000 computer | amicrawler | MarketPlace | 4 | 19 September 2009 21:50 |
Amiga inc reveal new entry Amiga computer - $489usd | Mikey_C | News | 132 | 01 October 2007 13:10 |
The DADDY Amiga computer is? | Bloodwych | Retrogaming General Discussion | 27 | 05 August 2002 18:14 |
|
|