Agree.
But why do we need container (stack) itself.
*Asm allows nested functions?*
*
*
Please commit your changes.

2009/8/13 Evgeniy Starov <[email protected]>

>  In Asm parser if we can't avoid "container" solution this should be
>>  '''list'''. I've checked it can help.
>
> stack is more  suitable for our purposes
>
> 2009/8/13 Evgeniy Starov <[email protected]>:
> > I made some optimisation in lexer grammar and now used stack instead
> > of vector for funcName.
> > and got performance enhancement ~20% /*not 200*/
> >
> > Fedor, please try to build parser from this grammar the same version
> > of flex/bison as c parser(with the same keys).
> > i'll try to think more about this problem at this weekend
> >
> > P.S: the truth is out of here...
> >
> > 2009/8/13 Evgeniy Starov <[email protected]>:
> >> i really don't remember,
> >> i'll see it today
> >>
> >> 2009/8/13 Fedor Korshunov <[email protected]>:
> >>> Evgeniy,
> >>> Whould you comment on implementation? Why should we use containers?
> >>> Thanks!
> >>> 2009/8/13 SourceAnalyzer <[email protected]>
> >>>>
> >>>> #341: Asm parser performance issues
> >>>>
> >>>>
> -----------------------+----------------------------------------------------
> >>>>  Reporter:  dr.fred   |       Owner:  dr.fred
> >>>>      Type:  task      |      Status:  assigned
> >>>>  Priority:  highest   |   Milestone:  Release 2.0.3
> >>>>  Component:  Main app  |    Severity:  critical
> >>>> Resolution:            |    Keywords:
> >>>>
> >>>>
> -----------------------+----------------------------------------------------
> >>>> Comment (by dr.fred):
> >>>>
> >>>>  {{{
> >>>>  vector<string> funcName;
> >>>>  }}}
> >>>>  To use this '''vector''' seems to be an unefficient solution. As in C
> >>>>  parser we should use
> >>>>  {{{
> >>>>  string file;
> >>>>  }}}
> >>>>  variable to save the name of a "current" function.
> >>>>
> >>>>  Addition a string at '''vector's''' front side is ''extremely slow''.
> >>>>  e.g.:
> >>>>  {{{
> >>>>  funcName.insert( funcName.begin(), $1 );
> >>>>  }}}
> >>>>
> >>>>  Developer have two variant's in such case:[[BR]]
> >>>>  1. Use '''deque''' (double-ended queue) container which is optimized
> for
> >>>>  "both-side" insertions[[BR]]
> >>>>  2. Use '''funcName.push_back()''' to add to the end of container
> instead
> >>>>  of it's front.
> >>>>
> >>>>  In Asm parser if we can't avoid "container" solution this should be
> >>>>  '''list'''. I've checked it can help.
> >>>>
> >>>> --
> >>>> Ticket URL:
> >>>> <http://trac-hg.assembla.com/SourceAnalyzer/ticket/341#comment:2>
> >>>> SourceAnalyzer <http://www.assembla.com/spaces/show/SourceAnalyzer>
> >>>> Development of a tool for analyze the source code and to build
> call-graph
> >>>>
> >>>
> >>>
> >>>
> >>> --
> >>> Best Regards,
> >>> Fedor Korshunov
> >>>
> >>> >>
> >>
> >> --
> >> Evgeniy Starov
> >>
> >
> >
> >
> > --
> > Evgeniy Starov
> >
>
>
>
> --
> Evgeniy Starov
>
>
> >
>


-- 
Best Regards,
Fedor Korshunov

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"SourceAnalyzer Team" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.ru/group/sa_team?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to