using LWP is faster and cleaner than using sockets
If with "faster" you mean "less time required to write the code", then presumably yes, because LWP provides a higher level programming interface than plain sockets, so you need to write less code to achieve the same effect.
OTOH, if "faster" means "runs faster", it wouldn't make much sense, as LWP uses sockets under the hood... so you could (in theory) always write low-level socket code that runs at least as fast.
| [reply] |
Raw sockets with custom http parser will run faster than LWP. LWP is much faster to write the code with. | [reply] |
what I meant was the speed of download time and also response times from the server. what is it like compared to other scripting languages like javascript, php, python etc when calculating response times
| [reply] |
In general, with a typical internet connection, the choice of programming language won't have a significant impact on download times. Unless your network, and the server on the other end, are extremely fast, the time spent by the client program creating sockets, shoveling bytes program-internally, etc., will be roughly one or two orders of magnitude less than the time spent waiting for things that go on program-externally, and are thus out of control of the program(-ming language).
As always, if you really want to know, write simple test programs, and benchmark them in a controlled environment.
| [reply] |