On Sat, Nov 9, 2013 at 3:22 AM, felix chang <lists / ruby-forum.com> wrote:
> Dear all:
>
> I have a file contain a lot of string.
> ex.
>
> ABADSFASVASDF
> ASDFASFASVASDF
> ASDFASFDASDF
> VASDFASVAS
> ASVASDFASDFASDF
> ASVASDFASDFASDFA
> ASDFASVASDFAF
> ASDFASFDAF
>
>
> I have to slice them if they match some criteria.

What do you mean by "slice" here?  What do you need to do to those lines?

> The file i had to process is very very hug (>100G).
> In order to speed up my program , i use gun_parallel to split the file
> and pipe to my script.

Do you mean "GNU Parallel"?
http://www.gnu.org/software/parallel/

> Is ts possible to drop parallel and use pure ruby to instead?

Yes, of course you can do that.  Keep in mind that depending how you
do it there might be a lot seeking on the file. That may actually hurt
performance.

There are also Gems around, e.g.
https://rubygems.org/gems/parallel

See https://rubygems.org/search?utf8=%E2%9C%93&query=parallel for more.

We can certainly come up with more concrete advice if you say what you
have to do to the input.

Kind regards

robert

-- 
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/