pure curiosity, perft speed with/without optimization

Discussion of chess software programming and technical issues.

Moderator: Ras

spirch
Posts: 95
Joined: Fri Nov 09, 2012 12:36 am

pure curiosity, perft speed with/without optimization

Post by spirch »

Hello all!

simply for pure curiosity

could you do some perft with and without optimization(or removing one by one until there is none)?

I know we all have different way to implement what we did, different language, OS, computer, etc. so I don't expect similar "result"

so mostly it's looking at % difference

let use this rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - with depth 6

I'm currently looking at implementing zobrist / TT / etc.

For me without optimization is

Image

With optimization, coming soon 8-)
spirch
Posts: 95
Joined: Fri Nov 09, 2012 12:36 am

Re: pure curiosity, perft speed with/without optimization

Post by spirch »

roce 0.0390

Image

PortFishNet40, no code modification, latest version on github

Image
Sven
Posts: 4052
Joined: Thu May 15, 2008 9:57 pm
Location: Berlin, Germany
Full name: Sven Schüle

Re: pure curiosity, perft speed with/without optimization

Post by Sven »

Info about used hardware, OS and type of compile (e.g. 32/64 bit) should be mentioned in my opinion, otherwise you don't know what you are comparing (engine speed or CPU power).

My current engine (still under development and not to be released in the near future) needs about 3.3s for perft(6) on an i7-3610QM @2.30GHz laptop under Win7Pro (64 bit) with a 32 bit compile (VS2010 Express). The engine uses magic bitboards. I did not spend a lot of effort to optimize it for "perft". I know there are a couple of much faster implementations but I don't care too much about it since I mainly use "perft" as a verification tool.

Sven
Sven
Posts: 4052
Joined: Thu May 15, 2008 9:57 pm
Location: Berlin, Germany
Full name: Sven Schüle

Re: pure curiosity, perft speed with/without optimization

Post by Sven »

Roce on my hardware (see above):

Code: Select all

loading: Roce.cfgRoce version: 0.0390 - Roman's Own Chess Engine
Copyright (C) 2003-2007 Roman Hartmann, Switzerland. All rights reserved.


roce: perft 6

Perft (6): 119060324, Time: 2.605 s
roce: 
So a factor of ~1.32 for Roce compared to your hardware, which might indicate that my engine would need about 2.5s on your hardware (but you'll never know).

Sven
spirch
Posts: 95
Joined: Fri Nov 09, 2012 12:36 am

Re: pure curiosity, perft speed with/without optimization

Post by spirch »

windows 7 64bits
i5 2500k @ 4.4
compile with anycpu

array based board with a lot of bitwise operation
spirch
Posts: 95
Joined: Fri Nov 09, 2012 12:36 am

Re: pure curiosity, perft speed with/without optimization

Post by spirch »

I was not expecting this...

I had my engine under vb.net, I decided to move it into C# (I used online code converter and I fixed the code that the converter messed up), since it is easier to share C# code with other peoples (somehow i always had issue when i was sharing my vb.net code)

this is what happened:

Image

anyway now I'm back into finishing my zobrist hashing and my TT implementation (above result is without both)