Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Programming question.

Author: Dann Corbit

Date: 13:44:47 03/19/99

Go up one level in this thread


On March 19, 1999 at 16:06:10, Inmann Werner wrote:

>Hello.
>
>Today I changed my hashtables from fixed one ta allocated one.
>
>Example
>Old
>
>long hindex[65536]
>signed char hcolor[65536]
>signed short int value[65536]
>.....
>
>New
>
>long *hindex
>signed char *hcolor
>signed short int *value
>....
>
>hindex=malloc(4*65536)
Suggestion: sizeof(long)*65536 is better if you want to use other machines.

>hcolor=malloc(65536)
>value=malloc(2*65536)
Suggestion: sizeof(short)*65536 is better if you want to use other machines.

>....
>
>Works fine but:
>
>On my P90, the NPS decreases about 30%  !!!!!
No surprise.  P90 does not have a 64 bit memory transfer.  You are doing a lot
more memory read writes.  This wimpy chip can't handle it very well.

>On my Cyrix 233 everything is fine (same speed)
No surprise, Cyrix 233 has a 64 bit memory transfer.

>Do I anything extremly wrong or what happens here. Has this something to do
>with Prozessor cache or what?
Memory bandwidth.  A big cache will help but not as much as a wider transfer.

>Any suggestions??
Don't worry about it.  Nobody sells P90 any more.

>Werner
>
>P.S.: Excuse my C, I come from Cobol....
>I use Watcom C Version 11 Compiler.



This page took 0.01 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.