Alexander Demenshin wrote:
On Thu, Nov 11, 2004 at 01:53:41PM -0600, lance dillon wrote:
person is really that performance-needy, then they need to go to a regular compiled language.
Well, the advantage of scripting language is that all you do you can test almost instantly - but this is not a real problem nowadays, since compilation times are quite short. The reason why I use Pike is not because it is scripting language, only because it is _nice_ (both features and syntax). In case if it would be compiled language, I would still use it (instead of C).
It seems to me that the language is plenty fast for the features it provides.
Depends what you do... And how often... I wouldn't write anything which needs a lot of CPU in Pike, unless I've enough CPU power...
Perl was (once) good too, but when I look at SpamAssassin, I am going crazy... This is an example of what shouldn't be done in languages like Perl, and (I believe) this shouldn't be done in Pike too.
What is special in SpamAssassin except in Perl thus unreadable by design?
creating a new vm. The problem is that java is not dynamic, it is static.
It depends on your goal. I don't use dynamic types, mostly, I only need it _sometimes_, so features provied by languages like C++ or D or C# (I don't use Java) are more than enough - I just use "variant" type or something like that.
a c char array. The jvm doesn't allow dynamic code, for example, using eval (or compile_string and others under pike).
Why not? Invoke java compiler, compile your code, load it - and that's all. You can even make a simple wrapper, call it "eval" and use it. The same applies to any (compiled) language - including C/C++. You can argue that this is not "native" - well, the difference is that (in case of Pike) you always have compiler (so you can use compile()), in case of any other language you have to have it installed, but this is not really important difference, IMHO.
The (some) advantages of VM (whatever it is) are:
- Reduce (or eliminate) compile time
- Reduce run-time
- Make possible to distribute precompiled binaries
That would be a big advantage for Pike for people who want to do commercial softwares. There is the dump of modules which allow you to avoid distributing the source code for Pike modules but it does it only for Pike modules.
Hash table lookups are almost always O(1). However, dependent on the size of the hash table.
Exactly - dependent on size. And - it takes more than pre-computed index (offset). I strongly believe that any unnecessary operations must be avoided whenever possible, and index (method) lookup during run-time is unnecessary in most cases (predicting that someone may argue this statement: in most cases where _I_ use Pike, at least).
BTW isn't the fact that every strings are hashed and put in table make that Pike is slow when it's eating lot of memory (like 1GB) ?
/ David
On Fri, Nov 12, 2004 at 12:25:25AM +0100, David Gourdelier wrote:
What is special in SpamAssassin except in Perl thus unreadable by design?
Run-time requirements - memory and CPU. It consumes ca. 150M of RAM in default installation, and processing of single message takes few seconds(!).
commercial softwares. There is the dump of modules which allow you to avoid distributing the source code for Pike modules but it does it only for Pike modules.
Often these dumped modules are as big as sources, and they cannot be easily relocated from one computer to another. Well, this is possible in general, but not easy. May be something changed in last few months, but the size...
BTW isn't the fact that every strings are hashed and put in table make that Pike is slow when it's eating lot of memory (like 1GB) ?
I don't know :) But I don't think so, since there are a lot of places where memory consumption is very high...
Regards, /Al
That would be a big advantage for Pike for people who want to do commercial softwares. There is the dump of modules which allow you to avoid distributing the source code for Pike modules but it does it only for Pike modules.
Non-pike modules are already binary and does not need to be dumped. You can distribute byte-compiled code if you like, but noone has said it's easy since it may or may not be compatible with the users pike version. If you send a Pike binary along with your distribution, you should be fine.
Marcus Agehall (PacketFront) @ Pike (-) developers forum wrote:
That would be a big advantage for Pike for people who want to do commercial softwares. There is the dump of modules which allow you to avoid distributing the source code for Pike modules but it does it only for Pike modules.
Non-pike modules are already binary and does not need to be dumped. You can distribute byte-compiled code if you like, but noone has said it's easy since it may or may not be compatible with the users pike version. If you send a Pike binary along with your distribution, you should be fine.
In my statement about source code, I was refering to Pike script file (not modules), that's why Bill spoke about modifying the master so that it looks at .pike.o files.
BTW what makes that this byte-compiled code is not compatible between Pike versions?
Also, is it possible to disassemble this byte-compiled code?
/ David
The encoding changed a while back. I'm not sure when exactly, but it works a lot better nowdays, so perhaps it's not an issue any more.
BTW what makes that this byte-compiled code is not compatible between Pike versions?
It contains a) direct pointers to pike functions and b) machine code.
This was changed a few months ago to dumping the intermediate code.
Has the paths dumped been changed to be relative to the pike installation whenever possible?
That's up to the codec.
How about pike -x dump, that should be the most relevant one.
That's what PIKE_MODULE_RELOC is for. Although it should probably be modified to make stuff relative to the libdir rather than the module path, since using the latter caused a lot of problems (which is why PIKE_MODULE_RELOC is not enabled by default).
Ah. So nothing differs now?
pike-devel@lists.lysator.liu.se