Re: Interesting Experiment With String/Sequence Slicing

new topic     » goto parent     » topic index » view thread      » older message » newer message

Hi Robert,

i have ran the profiler and the bottle neck still
shows up when doing string slicing.  in the
example below sLine contains a text string (50k)
read from a html file, the example below took
about 4 seconds to execute, i just somehow believe
4 seconds is way too long just to do string slicing...
is there a remedy?

regards,
sam

       |for i=1 to 1000 do
 62.67 | sLine2 = sLine[2..length(sLine)]
       |end for
      |
       |for i=1 to 1000 do
  8.38 | sLine2 = sLine
 28.34 | sLine2 = sLine2[2..length(sLine2)]
       |end for
       |


ps "thanks" to Derek for the work around suggestion
i will definitely be implement his technique when doing 
concatenation and slicing.



----- Original Message ----- 
From: "Robert Craig" <rds at RapidEuphoria.com>
To: "EUforum" <EUforum at topica.com>
Sent: Tuesday, August 21, 2001 2:10 PM
Subject: Re: Interesting Experiment With String/Sequence Slicing


> 
> Sam Lie writes:
> > i am just curious as to ways the program can be 
> > optimised and i have run out of avenues except 
> > looking how i can get around the slicing issue.
> 
> Since you are a registered user, you can say:
>      "with profile"
> at the top of your main file, to get a count of 
> statements executed, or even better with ex.exe:
>      "with profile_time"
> to get the percentage of time consumed by each statement.
> 
> These reports go to a file called "ex.pro".
> It will show you the statements that are consuming 
> most of the time. If you post the relevant chunk(s)
> of code to this list, someone, maybe me, can 
> probably suggest a faster way to do the same thing.
> 
> The first time you profile a program you often
> discover something surprising.
> 
> Regards,
>    Rob Craig
>    Rapid Deployment Software
>    http://www.RapidEuphoria.com
> 
> 
> 
> 
> 
> 



*********************************************************************************
This email and any files transmitted with it may be legally privileged 
and confidential.  If you are not the intended recipient of this email,
you must not disclose or use the information contained in it.  If you 
have received this email in error, please notify us by return email and 
permanently delete the document.
*********************************************************************************

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu