From: xscript Date: Sun, 15 May 2011 20:16:47 +0000 (+0200) Subject: Synchronize cedet/semantic with Emacs. X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6f765896c6fb6c08be040d2d4ced895252d68817;p=emacs.git Synchronize cedet/semantic with Emacs. --- diff --git a/test/manual/cedet/cedet/semantic/find.el b/test/manual/cedet/cedet/semantic/find.el new file mode 100644 index 00000000000..ce61c423624 --- /dev/null +++ b/test/manual/cedet/cedet/semantic/find.el @@ -0,0 +1,42 @@ +(defun semantic-find-benchmark () + "Run some simple benchmarks to see how we are doing. +Optional argument ARG is the number of iterations to run." + (interactive) + (require 'benchmark) + (let ((f-name nil) + (b-name nil) + (f-comp) + (b-comp) + (f-regex) + ) + (garbage-collect) + (setq f-name + (benchmark-run-compiled + 1000 (semantic-find-first-tag-by-name "class3" + "test/test.cpp"))) + (garbage-collect) + (setq b-name + (benchmark-run-compiled + 1000 (semantic-brute-find-first-tag-by-name "class3" + "test/test.cpp"))) + (garbage-collect) + (setq f-comp + (benchmark-run-compiled + 1000 (semantic-find-tags-for-completion "method" + "test/test.cpp"))) + (garbage-collect) + (setq b-comp + (benchmark-run-compiled + 1000 (semantic-brute-find-tag-by-name-regexp "^method" + "test/test.cpp"))) + (garbage-collect) + (setq f-regex + (benchmark-run-compiled + 1000 (semantic-find-tags-by-name-regexp "^method" + "test/test.cpp"))) + + (message "Name [new old] [ %.3f %.3f ] Complete [newc/new old] [ %.3f/%.3f %.3f ]" + (car f-name) (car b-name) + (car f-comp) (car f-regex) + (car b-comp)) + ))