RE: More About Memory -- case study
by Blue (Hermit) on Oct 19, 2000 at 22:07 UTC
|
Here are my times:
1 to 26: 6.2 sec
26 to 1: 10.5 sec
A to Z: 3.8 sec
Z to A: 56.2 sec
As a quick note, my 1 to 26 times were slowed by multisylabic names, where A to Z was not, but each had about the same pause (none) between items.
26 to 1 was good, got slightly caught at 20 to 19, but it didn't repeat at 10 to 9.
Z to A took much backtracking. If I had to do it "straight" I would put "can not complete" instead of a time.
=Blue
...you might be eaten by a grue... | [reply] |
RE: More About Memory -- case study
by BlaisePascal (Monk) on Oct 19, 2000 at 22:21 UTC
|
1-26: 22 seconds
26-1: 17 seconds
a-z: 7 seconds
z-a: 16 seconds
I don't know why I was faster counting down than up. I think it's because I normally count seconds when counting up, so I tend to pace myself.
As for the alphabet... I didn't recite it -that- fast. When I try to recite it as fast as possible... 2 seconds. I will also admit to having practiced reciting the alphabet quickly, forwards and back, in my misspent youth (I coulda spent it playing sports, having sex, and getting drunk, but no, I spent it on programming, Rubiks cubes, and reciting the alphabet forwards and backwards. I now know the error of my ways...)
Timing done with "date;read;date" on a WinNT box running cygwin.
| [reply] |
|
OK, repeating the counting up/down without pacing myself...
- 1-26: 6 seconds
- 26-1: 7 seconds
| [reply] |
RE: More About Memory -- case study
by japhy (Canon) on Oct 19, 2000 at 23:14 UTC
|
If you want to know what all this is for, how would you describe
(as COMPLEX AS YOU WANT OR NEED to) how the alphabet is stored
in your brain, in Perl terms as much as applicable.
(You obviously don't store it as an array...)
$_="goto+F.print+chop;\n=yhpaj";F1:eval | [reply] |
|
The best way to describe it would be to say that I store the alphabet as a singly linked list, with a few pointers to "well used" parts so that I don't always start at the beginning. Pointers to "A" (the song), "L" (el-em-en-o-pee), "T" (I guess because of the hard sound), and "X" (xyz).
When going backwards, I did a section, went back to my closest pointer, went forward until I found my last backwards, keeping as much as I could in a small short term memory space (say an array of 5 to 7 elements).
As a side note, doing the alphabet forward was not traversing each element as I needed it, but a rather efficient block load which pulled in a "mouthful" of elements, spitting them out autonomously so that there were no I/O blocking.
Damn I feel geeky. 8)
=Blue
...you might be eaten by a grue...
| [reply] |
|
<cite>
When going backwards, I did a section, went back to my closest
pointer, went forward until I found my last backwards, keeping
as much as I could in a small short term memory space (say an
array of 5 to 7 elements).
</cite>
Yes, this is because you know the proximity of some
of the letter. The node for 's' might look like:
s => {
next => 't',
near => 'r',
}
$_="goto+F.print+chop;\n=yhpaj";F1:eval | [reply] [d/l] |
|
|
I'd think it's a hash that looks like a linked list:
%alphabet = (
a => 'b',
b => 'c',
c => 'd',
# ...
);
This is because I can start ANYWHERE in the alphabet and
continue to the end. But the structure is really a bit more
complex than that, since I do know the POSITION of some of
the letters, as well as the letter that comes before it. So
it's a partially linked list. You'll see my report soon
enough...
$_="goto+F.print+chop;\n=yhpaj";F1:eval | [reply] [d/l] |
|
How about a doubly-linked list with "hash characteristsics"? The back links are "slower" than the forward links. I say "hash characteristics" since it is unneccessary to count to 5 in order to use the number...Any other ideas?
Update: maybe even a hash with linked list characteristics?
| [reply] |
RE: More About Memory -- case study
by motomuse (Sexton) on Oct 20, 2000 at 02:22 UTC
|
o 5 sec
o 7 sec
o 3 sec
o 25 sec | [reply] |
(jeffa) RE: More About Memory -- case study
by jeffa (Bishop) on Oct 20, 2000 at 07:53 UTC
|
1 - 4 secs
2 - 7.5
3 - 3.5
4 - 27 # my brain felt like a nested ?= in reverse
| [reply] [d/l] |
RE: More About Memory -- case study
by isotope (Deacon) on Oct 19, 2000 at 23:01 UTC
|
| [reply] |
RE: More About Memory -- case study
by Shendal (Hermit) on Oct 19, 2000 at 23:09 UTC
|
I don't see the point of what you're trying to accomplish... but what the heck... I'm bored.
1 to 26: 5 sec
26 to 1: 9 sec
A to Z: 3.5 sec
Z to A: 45 sec
Cheers,
Shendal
| [reply] |
(ar0n) RE: More About Memory -- case study
by ar0n (Priest) on Oct 20, 2000 at 01:06 UTC
|
- 5.9 s
- 9.2 s
- 3.4 s
- 22.2 s
[ar0n - bored]
| [reply] |
RE: More About Memory -- case study
by adamsj (Hermit) on Oct 20, 2000 at 20:29 UTC
|
1-26: 6 s
26-1: 11 s
A-Z: 4 s
Z-A: 16 s | [reply] |
RE: More About Memory -- case study
by AgentM (Curate) on Oct 19, 2000 at 21:39 UTC
|
Are we trying to this as quickly as possible or as accurately as possible? (i.e. is this a race against the clock?)
| [reply] |
|
Don't say the alphabet one letter/second, because you can
probably say it backwards at that speed, too. Try saying it
backwards at the same speed you said it forwards.
$_="goto+F.print+chop;\n=yhpaj";F1:eval
| [reply] |
RE: More About Memory -- case study
by AgentM (Curate) on Oct 19, 2000 at 22:22 UTC
|
- 6:50 s
- 11:92 s
- 4:39 s
- maybe some other time
<\ul>
Does this have something to do with perl algorithm analysis? Fill in the missin' link for me...
| [reply] |