官术网_书友最值得收藏!

What are the drawbacks?

Probably, the only drawback that one could find in Python, which is not due to personal preferences, is the execution speed. Typically, Python is slower than its compiled brothers. The standard implementation of Python produces, when you run an application, a compiled version of the source code called byte code (with the extension .pyc), which is then run by the Python interpreter. The advantage of this approach is portability, which we pay for with a slowdown due to the fact that Python is not compiled down to machine level as are other languages.

However, Python speed is rarely a problem today, hence its wide use regardless of this suboptimal feature. What happens is that in real life, hardware cost is no longer a problem, and usually it's easy enough to gain speed by parallelizing tasks. When it comes to number crunching though, one can switch to faster Python implementations, such as PyPy, which provides an average 7-fold speedup by implementing advanced compilation techniques (check http://pypy.org/ for reference).

When doing data science, you'll most likely find that the libraries that you use with Python, such as Pandas and Numpy, achieve native speed due to the way they are implemented.

If that wasn't a good enough argument, you can always consider that Python is driving the backend of services such as Spotify and Instagram, where performance is a concern. Nonetheless, Python does its job perfectly adequately.

主站蜘蛛池模板: 福泉市| 绥阳县| 进贤县| 微山县| 博野县| 双峰县| 汶上县| 钟祥市| 通海县| 水城县| 呼和浩特市| 汝阳县| 鲁甸县| 会理县| 盐源县| 海门市| 沾化县| 乳源| 嘉义市| 囊谦县| 商丘市| 桂阳县| 汨罗市| 八宿县| 利津县| 涿鹿县| 吐鲁番市| 获嘉县| 临江市| 大悟县| 东乌珠穆沁旗| 城固县| 新乡市| 吉木乃县| 南岸区| 潢川县| 合作市| 唐河县| 金沙县| 阳原县| 永丰县|