Just a little experiment to get an idea of the speed difference between a hand-coded Javascript chess engine running in Node (Google V8 Javascript engine) v C. About x 3 to 4 for C.
https://github.com/op12no2/clozza
I'll see how much faster I can make the C version now.
Hand coded Javascript v C speed
Moderators: hgm, Rebel, chrisw
-
- Posts: 505
- Joined: Tue Feb 04, 2014 12:25 pm
- Full name: Colin Jenkins
-
- Posts: 4
- Joined: Mon May 20, 2024 10:45 am
- Full name: Leo Fruijtier
Re: Hand coded Javascript v C speed
I'd love to see the javascript engine run in bun, it's compatible with node.js code and much faster: https://bun.sh/
-
- Posts: 505
- Joined: Tue Feb 04, 2014 12:25 pm
- Full name: Colin Jenkins
Re: Hand coded Javascript v C speed
Interesting, I'll try it. I think CCRL use Node but if bun is significantly faster it'd be a nice bump for the Javascript engines.leothetechguy wrote: ↑Wed May 29, 2024 10:27 am I'd love to see the javascript engine run in bun, it's compatible with node.js code and much faster: https://bun.sh/
-
- Posts: 505
- Joined: Tue Feb 04, 2014 12:25 pm
- Full name: Colin Jenkins
Re: Hand coded Javascript v C speed
Slightly faster:-
I'll try a match...
Code: Select all
xyzzy@work:~$ bun clozza.js bench q
26.6 sec 51786380 nodes
xyzzy@work:~$ node clozza.js bench q
29.3 sec 51786380 nodes