[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: fewer Objective C messages within Swarm
From: |
pauljohn |
Subject: |
Re: fewer Objective C messages within Swarm |
Date: |
Sat, 07 Jul 2001 09:40:01 -0500 |
I'm going to build another gcc rpm that uses your objc-act.c patch
below. I'll announce here when they are ready, but first:
Question: Do you also have a patch for gcc 3.0 which makes the
compile/runtime warnings about objc_mesg_whatever go away?
Question 2: How do you cut down the number of messages as you describe
below?
Question 3: Does this affect performace of models written in objective
C?
"Marcus G. Daniels" wrote:
>
> In today's snapshot there's a build configuration which significantly
> reduces the number of Objective C messages within Swarm itself.
>
> ftp://ftp.swarm.org/pub/swarm/src/testing/swarm-2001-07-06.tar.gz
>
> The speedup is sensitive to the kind of model, but for the Java model
> I'm working on the speed up is about 20 %. Basically, the more
> complex of a model it is (in terms of Swarm scheduling), the faster it
> will be. This was a fairly large patch to Swarm, and although it
> doesn't cover all potential Objective messages within Swarm, it chops
> down the tall trees... More work is possible -- see
> src/{defobj/collections/activity}/macros.h if you are curious.
>
> Note: Objective C messaging is very fast. To give you an idea, my 20 %
> speedup (over a mere five seconds) involved eliminating 34,000,000
> message dispatches!
>
> A hassle is that it requires this compiler patch.
> (made against GCC 3.0)
>
> *** /home/mgd/objc-act.c Fri Jul 6 17:30:03 2001
> --- objc-act.c Thu Jun 14 19:08:40 2001
> ***************
> *** 7119,7129 ****
> char *buf;
>
> /* Synth the storage class & assemble the return type. */
> - #if 0
> sc_spec = tree_cons (NULL_TREE, ridpointers[(int) RID_STATIC], NULL_TREE);
> - #else
> - sc_spec = tree_cons (NULL_TREE, ridpointers[(int) RID_EXTERN], NULL_TREE);
> - #endif
> ret_spec = TREE_PURPOSE (TREE_TYPE (method));
> decl_specs = chainon (sc_spec, ret_spec);
>
> --- 7119,7125 ----
>
> To build Swarm using such a modified GCC, run `make' like so:
>
> $ make EXTRACPPFLAGS=-DMETHOD_FUNCTIONS
>
> In addition, using the Swarm patch below, you can improve the performance of
> Java models which make many calls on Swarm, e.g. calling the random
> number generator, Tk graphics routines, etc. This patch requires a
> GCC as modified above.
>
> Index: interface.el
> ===================================================================
> RCS file: /cvs/hive/Swarm/swarm/etc/interface.el,v
> retrieving revision 1.30
> diff -c -r1.30 interface.el
> *** interface.el 2001/04/19 02:59:07 1.30
> --- interface.el 2001/07/06 23:08:57
> ***************
> *** 625,631 ****
>
> (defun create-dispatch-hash-table (protocol phase)
> (let ((ht (make-hash-table)))
> ! ;(load-dispatch-hash-table protocol phase ht)
> ht))
>
> (defun c-objc-type (type)
> --- 625,631 ----
>
> (defun create-dispatch-hash-table (protocol phase)
> (let ((ht (make-hash-table)))
> ! (load-dispatch-hash-table protocol phase ht)
> ht))
>
> (defun c-objc-type (type)
>
> ==================================
> Swarm-Support is for discussion of the technical details of the day
> to day usage of Swarm. For list administration needs (esp.
> [un]subscribing), please send a message to <address@hidden>
> with "help" in the body of the message.
--
Paul E. Johnson email: address@hidden
Dept. of Political Science http://lark.cc.ukans.edu/~pauljohn
University of Kansas Office: (785) 864-9086
Lawrence, Kansas 66045 FAX: (785) 864-5700
==================================
Swarm-Support is for discussion of the technical details of the day
to day usage of Swarm. For list administration needs (esp.
[un]subscribing), please send a message to <address@hidden>
with "help" in the body of the message.