From e63bff30be008c4dfe1ee225c1879baecbeb0ab3 Mon Sep 17 00:00:00 2001 From: Matthias Benkard Date: Wed, 19 Mar 2008 03:07:42 +0100 Subject: Add a NAME slot to class SELECTOR. darcs-hash:c51f1608afb05ec84f8f615114cb7f9f65abf8fe --- JOURNAL | 45 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) (limited to 'JOURNAL') diff --git a/JOURNAL b/JOURNAL index 81398ef..926e9ce 100644 --- a/JOURNAL +++ b/JOURNAL @@ -3,7 +3,7 @@ #title Objective-CL Development Diary #desc News from the Objective-CL lab -; Time-stamp: <2008-03-18 18:00:52 mulk> +; Time-stamp: <2008-03-19 03:07:26 mulk> ; ; C-c i t insert-time-stamp ; C-c C-t muse-project-publish-this-file @@ -18,6 +18,49 @@ Context: [[http://matthias.benkard.de/objective-cl][The Objective-CL Project]]. ---- +* 2008-03-19, 03:03:50 CET + +** Optimising INVOKE + +The benchmark: + + +(let ((x (invoke (find-objc-class 'ns-method-signature) + :method-signature-for-selector 'new))) + (time (dotimes (i 100000) (invoke x :get-argument-type-at-index 0)))) + + +Before: + + +Evaluation took: + 7.727 seconds of real time + 7.136446 seconds of user run time + 0.080005 seconds of system run time + [Run times include 0.288 seconds GC run time.] + 0 calls to %EVAL + 0 page faults and + 218,448,224 bytes consed. + + +After: + + +Evaluation took: + 5.868 seconds of real time + 5.824364 seconds of user run time + 0.032002 seconds of system run time + [Run times include 0.256 seconds GC run time.] + 0 calls to %EVAL + 0 page faults and + 122,487,656 bytes consed. + + +What I did was add a **name** slot to class **selector** so that **selector-name** +need only access a slot now instead of calling a foreign function and +converting the returned value to a Lisp string. + + * 2008-03-18, 15:31:30 CET ** Profiling INVOKE -- cgit v1.2.3