[antlr-interest] Profiler of ANTLR usage
Bryan Ewbank
ewbank at gmail.com
Thu Dec 1 15:12:14 PST 2005
One BIG improvement we're working on is being very careful to use
buildAST=false for as many passes as you can. This reduces space as
well as time for those passes that just annotate the tree, or do very
small tree surgery operations.
Also, as Martin said, avoid "( ) =>" predicates like the plague. Do
everything you can to use "{ }?" instead.
- Bryan
On 12/1/05, Ruslan Zasukhin <sunshine at public.kherson.ua> wrote:
> Hi ANTLR list,
>
> I have get some profiling.
>
> Simple test. We add 100,000 record using SQL INSERT into Valentina database.
>
> As you can see
>
> ANTLR take 74.6% of time. This is only parsing and tree parsing :-((
>
> Valentina do rest work to put million records in 13.6% + 4.6% = 18.2%
>
> As I have always told, on top of problem are
> std::strings, which do a lots of new/delete...
>
>
> -------------------------------------------------------------------------------
> 0.0% 99.9% Common_SetExtesions main
> 0.0% 99.9% Common_SetExtesions Example()
> 0.1% 99.2% Common_SetExtesions AddRecords(fbl::smart_ptr<fbl::vsql::I_Database>)
> 0.1% 96.7% libvkernel_ppc_debug.dylib fbl::vsql::Database::SqlExecute(fbl::String const&, fbl::smart_ptr<fbl::ArrayOfSmartPtrs<fbl::smart_ptr<fbl::I_Value> > >)
> 0.1% 96.4% libvkernel_ppc_debug.dylib fbl::vsql::SqlParser::SqlExecute(fbl::vsql::I_Database*, fbl::String const&, fbl::smart_ptr<fbl::ArrayOfSmartPtrs<fbl::smart_ptr<fbl::I_Value> > >)
>
> 0.1% 74.6% libvkernel_ppc_debug.dylib fbl::vsql::SqlParser::ParseCommand(fbl::String const&, fbl::vsql::Environment&)
> 0.0% 13.6% libvkernel_ppc_debug.dylib fbl::vsql::SqlParser::PreprocessCommand(fbl::vsql::Environment&)
> 0.0% 4.6% libvkernel_ppc_debug.dylib fbl::vsql::SqlParser::ProceedCommand(fbl::vsql::Environment&)
>
> 0.0% 2.3% libvkernel_ppc_debug.dylib fbl::vsql::Environment::~Environment [in-charge]()
> 0.0% 0.6% libvkernel_ppc_debug.dylib fbl::vsql::Environment::Environment[in-charge](fbl::smart_ptr<fbl::vsql::I_Database>, fbl::String const&, fbl::smart_ptr<fbl::ArrayOfSmartPtrs<fbl::smart_ptr<fbl::I_Value> > >)
> 0.1% 0.1% libstdc++.6.dylib std::basic_istringstream<char, std::char_traits<char>, std::allocator<char> >::str(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
> 0.1% 0.1% libstdc++.6.dylib std::basic_ios<char, std::char_traits<char> >::clear(std::_Ios_Iostate)
> 0.0% 0.1% libvkernel_ppc_debug.dylib fbl::Environment::~Environment [not-in-charge]()
> 0.1% 0.1% libvkernel_ppc_debug.dylib fbl::smart_ptr<fbl::vsql::I_Database>::smart_ptr[in-charge](fbl::vsql::I_Database*, bool)
> 0.0% 0.1% libvkernel_ppc_debug.dylib fbl::smart_ptr<fbl::vsql::I_Cursor>::operator=(fbl::vsql::I_Cursor*)
>
> --
> Best regards,
>
> Ruslan Zasukhin
> VP Engineering and New Technology
> Paradigma Software, Inc
>
> Valentina - Joining Worlds of Information
> http://www.paradigmasoft.com
>
> [I feel the need: the need for speed]
>
More information about the antlr-interest
mailing list