Drop of nps : why ?
Posted: 21 Feb 2006, 18:14
Hello all,
My chess engine is very weak, so I have lot of work to improve it. But very often when I try to ameliorate the code, there is a huge nps drop (a factor 3 to 10 often). My question is why ? Could someone explain me so that I could stop doing silly changes in the code, cause it's time consuming and very desperating ?
It is very uneasy for me to describe exactly when it arise, otherwise I would not post here. Although, is it possible to have something to do with passing tables byref or byval through subroutines ? I use tables in move generation (move_from, move_to, move_expected_score by SEE) and sorting, recently I tried to change something in the argument of quiescent move generation subroutine, and the nps droped : the code seems to prefer passing Byval instead that Byref as I have noticed (at least I suppose). Could it be due to the VB.net, and why? I know lot of you are using C or C++ but the problem should be common to these languages (I still suppose). Could it be a stack limitation or something like that (sorry to ask things I don't really understand) Is the code structure very important ? Is it better to avoid passing tables through subroutines ?
I'm not a guru programmer, being sure of nothing, so, any idea is welcomed . Thanks for any help,
Yves
My chess engine is very weak, so I have lot of work to improve it. But very often when I try to ameliorate the code, there is a huge nps drop (a factor 3 to 10 often). My question is why ? Could someone explain me so that I could stop doing silly changes in the code, cause it's time consuming and very desperating ?
It is very uneasy for me to describe exactly when it arise, otherwise I would not post here. Although, is it possible to have something to do with passing tables byref or byval through subroutines ? I use tables in move generation (move_from, move_to, move_expected_score by SEE) and sorting, recently I tried to change something in the argument of quiescent move generation subroutine, and the nps droped : the code seems to prefer passing Byval instead that Byref as I have noticed (at least I suppose). Could it be due to the VB.net, and why? I know lot of you are using C or C++ but the problem should be common to these languages (I still suppose). Could it be a stack limitation or something like that (sorry to ask things I don't really understand) Is the code structure very important ? Is it better to avoid passing tables through subroutines ?
I'm not a guru programmer, being sure of nothing, so, any idea is welcomed . Thanks for any help,
Yves