MaxCoderz

for your 1 bit pleasure!

All times are UTC




Post new topic Reply to topic  [ 70 posts ]  Go to page 1, 2, 3, 4, 5  Next
Author Message
 Post subject:
PostPosted: Wed 29 Jun, 2005 8:08 am 
Offline
Maxcoderz Staff

Joined: Fri 17 Dec, 2004 5:33 pm
Posts: 790
Location: On the dark side of the moon.
Quote:
The routine may only use a, bc, de, hl, ix and the array given. The stack may be used aswell.


I can't use space in saferam to store data?

And what do you mean with double? Like double bytes aka. a word?

_________________
"They say that sea was created by a man named Maarten Zwartbol, a long time ago...." - Duck, an old Corbin version


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed 29 Jun, 2005 8:59 am 
Offline
Maxcoderz Staff
User avatar

Joined: Wed 15 Dec, 2004 7:26 pm
Posts: 2735
Location: The Hague, Netherlands
No, saferam is not available.

With double i mean; some values are two times in the array (like 15).

Please don't post in the competition thread :P

_________________
Image


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed 29 Jun, 2005 9:04 am 
Offline
MCF Legend

Joined: Mon 20 Dec, 2004 8:45 am
Posts: 1601
Location: Budapest, Absurdistan
What's the objective here? Smallest or fastest routine? Writing a small one isn't much of a challenge, even my tutorial includes one...

_________________
The Independent Z80 Assembly Guide
Acelgoyobis
PindurTI


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed 29 Jun, 2005 9:08 am 
Offline
Calc King
User avatar

Joined: Sun 26 Dec, 2004 5:27 am
Posts: 2457
Location: SXIOPO = Infinite lives for both players
Also about what to optimise for(size or speed). Should the routine be abe to handle an array greater than 256 bytes? Any value in the array or just a limited spectrum?

_________________
Image


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed 29 Jun, 2005 10:02 am 
Offline
Maxcoderz Staff
User avatar

Joined: Wed 15 Dec, 2004 7:26 pm
Posts: 2735
Location: The Hague, Netherlands
CoBB wrote:
What's the objective here? Smallest or fastest routine? Writing a small one isn't much of a challenge, even my tutorial includes one...
Atm it is size, but if you come up with a system to judge speed-size, it would be both

Quote:
Should the routine be abe to handle an array greater than 256 bytes? Any value in the array or just a limited spectrum?
The array can be of any length. So that would be a yes I gues. Any value in the array? I don't know. Values can be between 0 and 254.

_________________
Image


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed 29 Jun, 2005 6:23 pm 
Offline
Extreme Poster

Joined: Mon 17 Jan, 2005 8:56 am
Posts: 346
Location: Indiana
Like all routines there is one best (smallest) way. And with a routine like this, it's possible more than one person will find it.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu 30 Jun, 2005 10:13 am 
Offline
Maxcoderz Staff
User avatar

Joined: Wed 15 Dec, 2004 7:26 pm
Posts: 2735
Location: The Hague, Netherlands
Spencer wrote:
Like all routines there is one best (smallest) way. And with a routine like this, it's possible more than one person will find it.
Meaning 'multiple' winners :)

_________________
Image


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu 30 Jun, 2005 8:15 pm 
Offline
Calc Wizard

Joined: Sun 19 Dec, 2004 9:02 pm
Posts: 585
Location: Sweden
This doesn't sound much like a competition right now, you better set some more rules to define _one_ winner. Figure out and post a weighing system for size/performance and try out the sorter on a set of generated arrays only revealed when the deadline is passed. Some sorters work better on some data (say halfsorted or near totally reversed order etc). Any length, does that mean max 16-bits offset?

I just think competitions should be a bit more strict and follow certain rules that are unquestionable and there should only be one winner. Otherwise, where's the glory of winning?


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri 01 Jul, 2005 5:26 am 
Offline
Maxcoderz Staff
User avatar

Joined: Thu 16 Dec, 2004 10:06 pm
Posts: 4095
Location: I cant seem to get out of this cryogenic chamber!
coelurus is right, there should be rules that will enable a clear winner to be found.

I think it should just be something like a pointer to the array is passed in hl and the routine should sort it and return. No extra args passed, no ability to know before-hand the contents of the array.

_________________
"My world is Black & White. But if I blink fast enough, I see it in Grayscale."
Image
Image


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri 01 Jul, 2005 4:12 pm 
Offline
Maxcoderz Staff
User avatar

Joined: Wed 15 Dec, 2004 7:26 pm
Posts: 2735
Location: The Hague, Netherlands
If you help me set up better rules it would be nice... I am just human too :?

_________________
Image


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri 01 Jul, 2005 4:31 pm 
Offline
Calc King
User avatar

Joined: Sun 26 Dec, 2004 5:27 am
Posts: 2457
Location: SXIOPO = Infinite lives for both players
Unless there is a prize I don't think better rules are really needed. So what if there are multiple winners, just hand out more congrats. :roll:

The problem here is it's hard to judge in speed, because the data affects the speed in most cases. If this were a sprite rouitine or an aligned mapper where the data has little affect on the perfomance speed may be a more viable judgeing criteria.

_________________
Image


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri 01 Jul, 2005 5:42 pm 
Offline
MCF Legend

Joined: Mon 20 Dec, 2004 8:45 am
Posts: 1601
Location: Budapest, Absurdistan
There's a very simple solution to that: fixed test cases. Like we do for the declarative programming course: homeworks are submitted to an online tutoring system that runs them through some tests and sends back execution time. After the deadline all programs are evaluated on a different test set, so people won't 'optimise' for the submission cases (like hardcoding the results and spitting them out immediately).

_________________
The Independent Z80 Assembly Guide
Acelgoyobis
PindurTI


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri 01 Jul, 2005 6:16 pm 
Offline
Calc King
User avatar

Joined: Sun 26 Dec, 2004 5:27 am
Posts: 2457
Location: SXIOPO = Infinite lives for both players
Still, how would you wiegh a size to speed ratio. Whats cosidered worth the size or the loss of speed.

Then agian, I would like to see a z80 quicksort routine Does one exist?

_________________
Image


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri 01 Jul, 2005 6:17 pm 
Offline
Maxcoderz Staff
User avatar

Joined: Thu 16 Dec, 2004 10:06 pm
Posts: 4095
Location: I cant seem to get out of this cryogenic chamber!
Well i think you are right with what you said before ... This isnt really a serious comp. More like a good excuse to write a routine.

Jim e, your entry is ... interesting :).

_________________
"My world is Black & White. But if I blink fast enough, I see it in Grayscale."
Image
Image


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri 01 Jul, 2005 6:56 pm 
Offline
MCF Legend

Joined: Mon 20 Dec, 2004 8:45 am
Posts: 1601
Location: Budapest, Absurdistan
I seem to recall sigma having done that. But it isn't a particularly hard programming problem, so there must be lots of implementations floating around.

Weighing: announce a speed winner and a size winner. It would be rather hard to beat you in the latter category. :)

_________________
The Independent Z80 Assembly Guide
Acelgoyobis
PindurTI


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 70 posts ]  Go to page 1, 2, 3, 4, 5  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB ® Forum Software © phpBB Group | DVGFX2 by: Matt