optimizing a program that just shuffles data, a bit like cat...

D

Dan Stromberg

....but with much bigger blocksizes, and with a netcat-like ability to use
sockets.

The program is at http://dcs.nac.uci.edu/~strombrg/pnetcat

I'm a bit concerned about the program's performance, because it actually
seems to get slower sometimes with larger blocksizes, which really isn't
what I'd been expecting. Also the megabits/second I'm getting isn't
really stellar either, at least not when using it on an optical network
(fibre and optical switching).

Also, is there any way to make len(big_buffer) fast, or to speed up or
eliminate the string slicing required (?) to handle partial writes?

Thanks a bunch!

(I'll put up a descriptive web page on the program later, when I have a
little bit more time. But for now, you can get a usage message with the
-h flag)
 
O

Oracle

...but with much bigger blocksizes, and with a netcat-like ability to use
sockets.

Try using psyco and see if that helps. Also, sometimes smaller blocks are
better than large blocks. Try using smaller block sizes and see if that
helps.

If you're worried about the time required to calculate the length of your
block, try calculating it once and pass the length around. Is that doable?
 
D

Dan Stromberg

[quoted text muted]

Try using psyco and see if that helps. Also, sometimes smaller blocks are
better than large blocks. Try using smaller block sizes and see if that
helps.

I like the psyco idea, but I'm on an AIX system with a powerpc CPU, rather
than an x86 CPU.
If you're worried about the time required to calculate the length of
your block, try calculating it once and pass the length around. Is that
doable?

AFAIK, that's what I've been doing...

Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top