Re: database contest article

2008-12-05 Thread Alexander Burger
Hi Tomas,

 I just tried to roughly benchmark the forking server and I do not
 think it is a limiting factor.  With the following code

That's right. For a database benchmark it is not a limiting factor, this
will be more on the db side.

However, if I try a non-forking server


#!bin/picolisp lib.l

(load ext.l lib/http.l lib/xhtml.l)

(allowed () @start)

(de start ()
   (html 0 Hello NIL NIL
  Hello World! ) )

(let (P (port 8080)  H @start)
   (setq *Home (cons H (chop H)))
   (loop
  (when (listen P)
 (http @)
 (close @) ) ) )


I get roughly three times as many transactions, compared to the forking
server. I also did

   $ siege -b -c 5 http://localhost:8080


But, as we saw already, this is only for an empty server. For real
applications the difference will be neglectible, especially as the fork
occurs only once for each session.

Cheers,
- Alex
-- 
UNSUBSCRIBE: mailto:[EMAIL PROTECTED]


Re: database contest article

2008-12-04 Thread Henrik Sarvell
Wasn't it somebody else?

Randall maybe...

/Henrik


On Thu, Dec 4, 2008 at 11:09 PM, Tomas Hlavaty [EMAIL PROTECTED] wrote:
 Hi Henrik,

 Well Thomas, I see that they used PHP in that test which means
 they're using the beloved Apache

 probably.

 which I think you have bashed earlier for its forkedness etc, this

 Wasn't it somebody else? ;-) Apache tries to be clever about forking,
 maintaining a process pool for example or using modules to avoid
 forking for each request.

 leads me to believe that it should be comparable with the PicoServer
 since they both fork and so on, correct or no?

 PicoLisp is not trying to be clever in the above way.

 You think Apache is faster than the PicoServer despite all its

 I don't know.  I did not make an opinion on this yet.

 bloatedness, maybe through the fact that it's compiled?

 PicoLisp and its web server is mostly compiled too.  But we could
 argue about that one for ever;-) That's one of the reasons I found the
 discussion about Lisp in hardware interesting (link posted at the
 beginning of this thread).

 Cheers,

 Tomas
 --
 UNSUBSCRIBE: mailto:[EMAIL PROTECTED]

-- 
UNSUBSCRIBE: mailto:[EMAIL PROTECTED]


Re: database contest article

2008-12-04 Thread Alexander Burger
On Thu, Dec 04, 2008 at 11:40:29PM +0700, Henrik Sarvell wrote:
 Wasn't it somebody else?
 
 Randall maybe...

I believe to remember it was Konrad ;-)

Cheers,
- Alex
-- 
UNSUBSCRIBE: mailto:[EMAIL PROTECTED]


Re: database contest article

2008-12-04 Thread Alexander Burger
Hi Tomas,

 Have you tried to rerun your solution and what improvement
 (trans/min) did you achieve?

Unfortunately not ... Actually, my compagnon Josef Bartl wrote it
initially. He urged that we participate. I did some tuning then, and he
did the testing. After that, both of us were busy, so we did not try
again. It is also a bit tedious, the system has to be set up, and
certain functions in lib/http.l need to be redefined to suit that
client simulator.

I must confess that in the beginning I did not want to participate in
that c't contest, as was never interested in optimizing PicoLisp for
speed, and always favored simplicity over fancy optimizations.


Actually, the error was minuscule. We submitted picoLisp-2.2.1.pre,
which still had - in src/io.c - the code

  for (x = data(c1); isCell(x); x = cdr(x))
 if (!isNeg(caar(x))  (n=(int)unDig(caar(x))/2)!=fd  
FD_ISSET(n,fdSet)) {
Push(at,val(At)),  val(At) = caar(x);
prog(cdar(x));
val(At) = Pop(at);
break;
 }

Unfortunately, it was not before picoLisp-2.2.3 that it was fixed. By
simply removing the 'break'! :-(

Cheers,
- Alex
-- 
UNSUBSCRIBE: mailto:[EMAIL PROTECTED]


Re: database contest article

2008-12-04 Thread Randall Dow
Hey, this is getting to be fun!  Alex, thanks for stopping and having a
beer!

Till next time!

Cheers!
- Rand


On Thu, Dec 4, 2008 at 6:56 PM, Alexander Burger [EMAIL PROTECTED]wrote:

 On Thu, Dec 04, 2008 at 05:06:39PM +, Tomas Hlavaty wrote:
  are we officially adopting blame culture? ;-)

 No, no, just protecting Randall :-)
 Because I'll meet him in one and a half hours in Munich.

 Cheers,
 - Alex
 --



--=_Part_40801_16679864.1228426029980
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hey, this is getting to be fun!nbsp; Alex, thanks for stopping and having a 
beer!brbrTill next time!brbrCheers!br- Randbrbrbrdiv 
class=gmail_quoteOn Thu, Dec 4, 2008 at 6:56 PM, Alexander Burger span 
dir=ltrlt;a href=mailto:[EMAIL PROTECTED][EMAIL 
PROTECTED]/agt;/span wrote:br
blockquote class=gmail_quote style=border-left: 1px solid rgb(204, 204, 
204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;div class=Ih2E3dOn 
Thu, Dec 04, 2008 at 05:06:39PM +, Tomas Hlavaty wrote:br
gt; are we officially adopting blame culture? ;-)br
br
/divNo, no, just protecting Randall :-)br
Because I#39;ll meet him in one and a half hours in Munich.br
br
Cheers,br
- Alexbr
divdiv/divdiv class=Wj3C7c--brbr
/div/div/blockquote/divbr

--=_Part_40801_16679864.1228426029980--
-- 
UNSUBSCRIBE: mailto:[EMAIL PROTECTED]