Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Fast - Compact That String

by zebedee (Pilgrim)
on Feb 13, 2012 at 00:25 UTC ( #953366=note: print w/replies, xml ) Need Help??


in reply to Fast - Compact That String

My environment is perl 5.8.8 with no compiler so I am limited to pure perl modules only.

You could, however, compile a (C/C++/asm/whatever) binary on a machine with a compiler and copy that binary across?

Not exactly in the spirit of the challenge, I know! Just sayin' ...

Replies are listed 'Best First'.
Re^2: Fast - Compact That String
by Limbic~Region (Chancellor) on Feb 13, 2012 at 14:55 UTC
    zebedee,
    Actually no - even that has problems. First, you need to be able to introduce a compiler. Of course this doesn't need to be the production environment but there is still a change control process that must be adhered to. The next problem you will face is that compiling C extensions for Perl using a compiler other than the one that compiled Perl usually doesn't work. This means either recompiling Perl or creating a stand alone executable and using system calls. These both have the same problems. Keep in mind that I fully recognize that these hurdles are not technical and are quite silly but one has to choose what they want to spend their time doing.

    Cheers - L~R

      Come now, your criteria were:

      "I need to very quickly compress these strings into the smallest space possible and also be able to expand them back again later as quickly as possible."

      and

      "My environment ... no compiler"

      No mention of change control or process there - you wanted raw speed and little space used and you couldn't compile on the production machine.

      But I can imagine the approach I was thinking of - spawning an external process - (and the communication with that process) would negate any speed advantages and I'm too lazy to prove it one way or another so I'll shut up and go away!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://953366]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (2)
As of 2018-07-22 18:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (455 votes). Check out past polls.

    Notices?