golang-Small Test Sledgehammer

Source: Internet
Author: User
This is a creation in Article, where the information may have evolved or changed.

First of all, why do I choose go? What has been done before is the development of the. NET platform, the common service-side language is C #. When I first approached C #, I liked the high-level language, which was elegant, easy to learn, short on development cycles, many advanced features and a self-hosted memory management GC ... It took nearly 3 years, and slowly felt its shortcomings (high memory consumption, system complexity, not lean enough, to the. NET framework of the strong lazy, unable to cross the platform, of course, now. NET core open source and cross-platform, performance also has a great improvement, just too many pits, The current use has not been popularized) and become intolerable. At the same time, a language called Go was getting more and more hot, so he looked at it. Said:

    • Simple, fast and secure
    • Parallel, fun, open source
    • Memory management, v array security, fast compilation

Just solves a part of C # can't solve the problem, the most important or short, concise and fast. I tried to do a data service that was similar to the one I took over before work. This service involves common open source projects such as Message Queuing rabbitmq,nosql redis cache, MySQL database, and so on. It took almost 1 months of idle time from learning to completing a complete service. The operating environment of the program is Win7 64bit, the following direct display of the running memory situation of the comparison:

1.c# (Data Service)

Process situation:

2.go (Data Service)

The compiled Windows console:

Process situation:

As you can see, the run memory of the Go program is basically a fraction of C # programs. (129m-7m) Here only compares their memory operation, this is also I use it's a very important reason, of course, there are iops,cpu, and mq,redis communication efficiency and so on performance comparison, and so on after the time, followed by the display.

Interested in this project novice, can go to my git to see the source, has been open source. Shortcomings, but also welcome the great God to criticize you!

Https://gitee.com/zhaohu37/zhiot-go

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.