IBM 75 GXP writing at 1.3 mb/sec ?

Thor_Sevan

Golden Member
Oct 14, 1999
1,182
0
0
Hi, I have a program here written in C++ that searches all different ways of writing a word with some letters. Lets say I give 3 letters, there are 6 posibilities. But, when I enter a BIG number of letters..... the number of possibilities goes up VERY fast. Anyway, with 10 letters... it creates a file (*.txt) of more than 50 MB. While creating the file... I run a system monitor that tells me at what speed the HD is writing the data, and it sais average 1.3 mb/sec. Why is it SO slow ? I mean.. I have a 75 gxp 30 GB hard disk.. its supposed to be much faster right ? ;)

Thanks !

Thor
 

Noriaki

Lifer
Jun 3, 2000
13,640
1
71
You are writing every permutation of n or less characters to a file?

And you expect it to be fast?

Maybe I'm misunderstanding what you are doing...but if I am getting it correctly, your hard drive is not the limiting factor there, your CPU is (no I don't know what speed CPU you have, but I know it's the limiting factor, if ran that on our 12way Model 840 AS/400 at work, the CPU would still be the limiting factor).

Edit:

Here's a good one for you ;)

F(0) = 1
F(1) = 1
F(n) = F(n-1) + F(n-2); where n > 1

Put that formula recursively into a C program (basically just how it is) and try to compute oh...say n = 100.

See how fast your computer seems then :D Oh BTW..don't plan on this ending for at least a few days...probably more than a week.

Edit #2: Actually C/C++ will only support 32bit integers, ~4billion won't be nearly big enough for the results of F(100)...try using scheme or lisp if you know either, then you can get rather large numbers.
 

CHHASmatroxuser

Senior member
May 5, 2000
299
0
0
Sounds low, but the harddrive can't write data faster than the CPU feeds it, so if your CPU is only capable of calculating 1.3 MB worth of results per second that's what will be written.
 

TGCid

Platinum Member
Oct 9, 1999
2,201
0
0
Recursive functions take a lot of resource. For Fibonacci numbers, it would take 5200 years if n is equal to 100!!
 

Thor_Sevan

Golden Member
Oct 14, 1999
1,182
0
0
Yes. What it does is to compute every possibility of letters or numbers.
For exemple, 3 letters, a,b,c
We have(abc,acb,bac,bca,cab,cba) a total of 6 possibilities.
Now... hehe... the more letters u add... the fonction grows MUCH MUCH bigger to compute ! ;) Yeah... the CPU could be a limiting factor.. Even if I have an Athlon 600 :)
 

SiliconVandal

Banned
Nov 17, 2000
786
0
0
If the CPU can only calcuate 1.3MB/SEC of it, thats why its getting it at such a slow rate. C isn't something to test HD speed on obviously because its completely CPU dependant.. :)

SV
 

Noriaki

Lifer
Jun 3, 2000
13,640
1
71
Yeah Thor, that function has an order n! result set. Depending on how you program it, you couldn't find a CPU fast enough to max out a hard drive.

Now if you wanna have some fun with it, then what you want to do is try and work out an algorithim to produce these strings in less time. I like that sort of challenge, but I'm a bit of an academic, it might bore you to tears hehehe :)
 

BChico

Platinum Member
May 27, 2000
2,742
0
71
Mine runs at 16mb/s, install the ibm storage drivers and it will work, before i installed mine i was getting what you got!
 

BChico

Platinum Member
May 27, 2000
2,742
0
71
Umm, they came on my mobo cd, i dont know where you can download, you are looking for Intel Ultra ATA Storage Driver...
 

Thor_Sevan

Golden Member
Oct 14, 1999
1,182
0
0
Well.. I have an Asus K7M (athlon 600)and installed updated drivers for my mobo including the VIADMATOOL drivers. Should I still download your intel drivers ?
Thanks !
 

BChico

Platinum Member
May 27, 2000
2,742
0
71
I lied before, when i said i only get 16, i actually get 34 read, 33 write, before i installed i got less than 1 mb/s at times!
 

JavaMomma

Senior member
Oct 19, 2000
701
0
71
weird you guys are talking about these fibonachi sequences

I just opened up my VB homework & i have to write a program to calculate it...

n = 10

not 100 :)
 

Thor_Sevan

Golden Member
Oct 14, 1999
1,182
0
0
Hehehehe... LOL :)

Yeah... me and my friend calculated... it would take MANY GB of Data to store a txt file to compute "owufhkjernujvjreijbt" as many possible ways. hehehe ;)
 

Noriaki

Lifer
Jun 3, 2000
13,640
1
71
Fibonacci numbers are easy....you can program it Order n very easily.

The reason it sticks in my mind is becuase the first time I ever had an assigment on them was in Scheme. Scheme is a functional programm language, the way you write code in it is naturally recursive. So it lends itself quite easily to the obvious (and extremely poor) Fib solution. Programming Fib order n with recursion takes a little thought. Not much, this was first year after all. But a bit.

It was just funny seeing how big the numbers got (Scheme doesn't cap integer sizes...at least not at anything reasonable, a few hundred digits doesn't bother it).

It's quite easy, espeically if you have iterative control structures.