简体   繁体   中英

php vs C++/Java for intensive processing, memory difference?

I have a php curl script that uses 10 MB per running session.

I'd like to scale things and add more requests but the curl and processing must be taking up too much memory. (I want to add like a 100,000 sessions)

If I had a server side C++ routine would the memory difference be that much different? I don't want to re-write the whole thing if it really isn't.

Is there a C++/Java method to keep a rolling curl going?

Thanks!

Well it totally depends what you are writing and how you write it. I'd be very surprised if you couldn't cut the memory footprint down using C++ though ...

PHP is getting better with performance all the time, but it is still a fairly heavy language. If you were to use C/C++, you would definutely see major performance increases. For anything under high load, you definutely need to move away from PHP to a more performance-oriented application.

That said, I do agree with Goz. It totally depends on what you are writing, as to what the performance increase will be.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM