Hi, I have pushed a patch to master that changes the implementation of the dynamic stack from being a linked list on the heap to being an actual stack. This allows us to push items on the stack in many cases without allocating memory at all.
This has become particularly important in `master', because ports in master have a similar locking discipline as stdio ports in glibc. (See "Streams and Threads" in the libc manual, for more.) The upshot is that there's a lot more scm_dynwind_pthread_mutex_lock in master, and that was slowing things down noticeably. This patch makes a simple "guile examples/web/debug-sxml.scm" server go from serving 3215 reqs/s to 3830 reqs/s. (Using "ab -n 100000 -c100 http://localhost:8080/" on the same machine to test; the machine is my laptop. By way of comparison, stable-2.0 does 3225 reqs/s on that benchmark.) Still, there are some things we can do to improve matters, especially with regards to prompts. If instead of storing a cookie, the VM did a setjmp() on entry, we could avoid allocating a jmpbuf for each prompt. This could bring some other code simplifications, notably, the cleanup of partial_cont_call. Anyway, these are disconnected ramblings. Review is welcome; I'll try to incorporate any feedback. Cheers! Andy -- http://wingolog.org/