Jens Elkner wrote:
[CC:'ing ksh93-integration-discuss at opensolaris.org since libast belongs
to this project]
> 
>                  regex.c                          RegexTest.java    MHz
> Solaris sparc    13.12u  0.01s  0:13.17  99.6%    5569 ms           1503
> Solaris x86       6.28u  0.00s  0:06.29  99.8%    2571 ms           2813
> Linux i686        0.704u 0.004s 0:00.70 100.0%    5587 ms           2079.593
> 
> Summary:
>     - Java Regex on Solaris is ~ 2.5x faster than the native Impl.
>       (hello?)
>     - Java Regex on Linux   is ~ 8x slower than the native Impl.
>     - performance is more or less directly related to System CPU Freq.
>     - Linux native regex Impl. is ~ 12.5x faster than Solaris native
>       regex impl. (correlated to CPU freq., no big difference whether
>       compared with x86 or sparc)
> 
>     Solaris native regex impl. really sucks!
> 
>     Solaris driven maschines are one of the worst choice to use e.g.
>     for regex driven mail filters!
> 
> Any comments or ideas, how to get better performance?  Already tried
> several compiler settings and ancient GNU regex source without success.
> 
> More information about test environments (HW/SW) and example progs used
> are available via: http://iws.cs.uni-magdeburg.de/~elkner/regex/

1. Which locale do you use ?
2. Starting with Solaris 11/B72 there is libast.so.1 which comes with an
own set of pattern matching functions. It may be nice to check how these
functions perform compared to the "normal" Solaris functions in libc.
Notes:
- You have to include the AST includes from /usr/include/ast/, e.g. you
have to do a -I/usr/include/ast/ before the norma? include search path
to "overlay" the libc functions (you can check this in your application
with "nm" - the libast symbol names have a |_ast|-prefix).
- You have to create a symlink from /usr/lib/libast.so to
/usr/lib/libast.so.1 before you can link with libast via -last

----

Bye,
Roland

-- 
  __ .  . __
 (o.\ \/ /.o) roland.mainz at nrubsig.org
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 7950090
 (;O/ \/ \O;)

Reply via email to