summaryrefslogtreecommitdiff
path: root/JOURNAL
diff options
context:
space:
mode:
authorMatthias Benkard <code@mail.matthias.benkard.de>2008-03-19 03:07:42 +0100
committerMatthias Benkard <code@mail.matthias.benkard.de>2008-03-19 03:07:42 +0100
commite63bff30be008c4dfe1ee225c1879baecbeb0ab3 (patch)
treea6b036e915bfa2b2922f0751874d16442054440a /JOURNAL
parent65f8d8bf8e9a709e549917837f7c01a31aad3928 (diff)
Add a NAME slot to class SELECTOR.
darcs-hash:c51f1608afb05ec84f8f615114cb7f9f65abf8fe
Diffstat (limited to 'JOURNAL')
-rw-r--r--JOURNAL45
1 files changed, 44 insertions, 1 deletions
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:
+
+<example>
+(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))))
+</example>
+
+Before:
+
+<example>
+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.
+</example>
+
+After:
+
+</example>
+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.
+</example>
+
+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