Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

really speed up oo1.pasm by 2

* add profile Configure support (gcc only)
* increase MIN_ITEMS of list chunks from 4 to 16
  (this was old debugging stuff left over)
* this speeds up object creation by a factor of 2


git-svn-id: https://svn.parrot.org/parrot/trunk@5550 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
  • Loading branch information...
commit 62c60b6841dec31a971fe6d523e502248f6875a3 1 parent 77e3ba0
Leopold Toetsch authored
View
6 Configure.pl
@@ -68,6 +68,12 @@ =head3 Parrot Configuration Options
Debugging is turned on by default. Use this to disable it.
+=item C<--profile>
+
+Turn on profiled compile (gcc only for now)
+
+Tell the compiler to do an optimization phase.
+
=item C<--optimize>
Tell the compiler to do an optimization phase.
View
16 config/init/data.pl
@@ -20,10 +20,10 @@ package Configure::Step;
$description="Setting up Configure's data structures...";
-@args=('debugging', 'optimize', 'verbose');
+@args=('debugging', 'optimize', 'profile', 'verbose');
sub runstep {
- my ($debugging, $optimize, $verbose) = @_;
+ my ($debugging, $optimize, $profile, $verbose) = @_;
package Configure::Data;
use Config;
@@ -116,15 +116,23 @@ sub runstep {
icu_make => '# Building of ICU disabled',
buildicu => 0,
-
+
);
+ # add profiling if needed
+ # FIXME gcc syntax
+ # we should have this in the hints files e.g. cc_profile
+ if ($profile) {
+ $c{cc_debug} .= " -pg ";
+ $c{ld_debug} .= " -pg ";
+ }
+
*get=sub {
shift;
@c{@_};
};
- *set=$verbose
+ *set=$verbose
? sub {
shift;
return unless (defined ($_[0]));
View
5 examples/benchmarks/oo1.pasm
@@ -1,3 +1,8 @@
+# all timings Athlon 800, gcc 2.95.2
+# parrot CVS
+# perl 5.8.0
+# python 2.3.3
+
# perl oo1.pl 0.8
# python pp1.py 1.2 (first time)
# python pp1.py 0.5
View
3  include/parrot/list.h
@@ -58,11 +58,12 @@ typedef enum {
} ARRAY_ADD_POS;
-#define MIN_ITEMS 4 /* smallest chunk can hold */
#ifdef LIST_TEST
+# define MIN_ITEMS 4 /* smallest chunk can hold */
# define LD_MAX 4 /* log2(MAX_ITEMS) */
# define MAX_ITEMS 16 /* biggest chunk can hold */
#else
+# define MIN_ITEMS 16 /* smallest chunk can hold */
# define LD_MAX 10 /* log2(MAX_ITEMS) */
# define MAX_ITEMS 1024 /* biggest chunk can hold */
#endif
Please sign in to comment.
Something went wrong with that request. Please try again.