Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2006-09

Shootout

4 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Daniël Mantione

Hi,

Encouraged by Vincent I made an attempt to implement the Chameneos benchmark of the Shootout. It turned out to be really hard, because we don't have real semafores (which makes it for example impossible to translate the C version).

However, with the RTLevent* routines, it is possible to implement it. I have a final problem I'm unable to solve at this time. When all threads exit, one of the threads still hangs in a RTLeventwaitfor call. We don't know which one.

The trick is to get it out of its wait state in a safe way. My currect solution (a set event call when the end is eached) sometimes fails, depending on the weather or something.

If anyone wants to take a look, the source is attached.

Daniël

Reply by email

Marc Weustink
to Daniël Mantione
Daniël Mantione wrote
Hi, Encouraged by Vincent I made an attempt to implement the Chameneos benchmark of the Shootout.

??? Last week I submitted chamenos to shootout and it got accepted.

It's only the work of one night, so it might need some improvement (it' isn't faster that the C implementation for instance)

Marc

Reply by email

Daniël Mantione
to Marc Weustink

Op Sat, 30 Sep 2006, schreef Marc Weustink:

Show quoted text 7 lines
Daniël Mantione wrote: > Hi, > > Encouraged by Vincent I made an attempt to implement the Chameneos > benchmark of the Shootout. ??? Last week I submitted chamenos to shootout and it got accepted.

Argh, then we have been double work :)

It's only the work of one night, so it might need some improvement (it' isn't faster that the C implementation for instance)

Mine neither :/

Daniël

Reply by email

Vincent Snijders
to Daniël Mantione
Daniël Mantione wrote 23 lines
Op Sat, 30 Sep 2006, schreef Marc Weustink: >Daniël Mantione wrote: > >>Hi, >> >>Encouraged by Vincent I made an attempt to implement the Chameneos >>benchmark of the Shootout. > >??? Last week I submitted chamenos to shootout and it got accepted. Argh, then we have been double work :) >It's only the work of one night, so it might need some improvement (it' >isn't faster that the C implementation for instance) Mine neither :/

If people are willing to help, I have some suggestions:

Create headers for gmp, so we can use gmp instead my own hacked bigint library. There is an header for gpc, but I don't know how compitable it is to fpc: http://www.mingw.org/cgi-bin/info2html/info2html?(gpc.info)GMP

Write a working regexpr engine. The one packages doesn't support looking for expressions that contain a "|" for example "ab|c".

Vincent

Reply by email