Three PK games exposed the level of ChatGPT!
Author|Xu Jiecheng
Reviewer|Yan Zheng
While Google and Microsoft are fiercely competing to seize the AI search engine market, some programmers are Not interested in eating melon. Because they have realized in advance that when this search war comes to an end, the software giants will continue to carry ChatGPT or other artificial intelligence generation tools and stride towards the blue ocean of automatic coding. By then, not to mention being a loser, even your own job may be threatened.
In today's automatic coding field, the two most mature and well-known AIs are ChatGPT, which has been in the limelight recently, and Copilot, the AI programming tool launched by Microsoft in June last year. , and these "two" are also the popular stars who are most expected to replace programmers at this stage. So for now, what are the coding capabilities of ChatGPT and Copilot? Will they really replace all junior and even some intermediate developers in the short term as rumored?
Recently, an American technical expert used multiple JavaScript function requirements to test the capabilities of ChatGPT and Copilot in data processing and algorithm generation. Next, let us use these results to understand the current real level of AI in coding, and then ask ourselves, will we really be replaced?
1. The JavaScript function accepts a variable number of arrays and returns the intersection
In the first test, the tester first asked ChatGPT and Copilot to generate a JavaScript function, with specific conditions For: Need to be able to accept a variable number of arrays and return their intersection.
OpenAI ChatGPT:
##Microsoft Copilot:
Faced with the above problem, Copilot generated the same code as the previous request. ChatGPT gave a different answer and added a comment saying that the function does not work on objects as expected, but this description is not accurate.
Then, the testers used the same method to check the operating efficiency and memory consumption of the code generated by the two fastest intersection libraries provided by ChatGPT and Copilt.
The code generated by ChatGPT takes up less CPU when executed, but the running efficiency is not ideal, and the code generated by Copilot Although the code uses less heap, its CPU usage and operating efficiency are poor.
In short, in this test, neither ChatGPT nor Copilot can generate efficient enough code; ChatGPT made wrong assumptions in this question; and the function generated by Copilot has parameters When duplicate values are included, code is generated that does not produce a collection.
2. JavaScript function: Cartesian product
The second test requires ChatGPT and Copilot to complete a Cartesian product JavaScript function.
OpenAI ChatGPT:
Anyone familiar with Cartesian products will know that from the perspective of memory utilization and performance, the results generated by ChatGPT and Copilot are explosive. A simple implementation would consume a lot of RAM to store all combinations and not return the result until all combinations have been generated. The functions generated by ChatGPT and Copilot both have these shortcomings.
Subsequently, testers once again asked ChatGPT and Copilot to improve function efficiency.
OpenAI ChatGPT:
##Microsoft Copilot:
In this regard, both ChatGPT and Copilot generated relatively inefficient codes. It is very efficient to convert strings first and then compare strings. Poor and consumes a lot of memory.
Although there are some JavaScript values that cannot be converted to strings, such as Infinity and NaN. Unfortunately, the JavaScript JSON specification was defined before the era of data science and microservices, and these values exist mainly so that when certain error conditions occur in the code, the program can also use specific values to represent the results produced.
Finally, in order to verify the function efficiency, the tester compared the code generated by ChatGPT and Copilot with the commonly used caching tools nano-memoize and micro-memoize, and used the following code to generate the first 12 Fibonacci numbers.
However, even if this is the result, today we still cannot ignore the potential of AI in the field of automatic coding and the powerful software companies behind these systems. What is certain is that as the amount of training and technology maturity increases, future automatic coding tools will continue to expand their business data in different scenarios, and gradually try to solve some more professional and scenario-based practical tasks.
Finally, as to the question "Can AI replace programmers in the future?", perhaps the most reliable answer at present is the former head of Alibaba Israel Machine Vision Laboratory Itamar Friedman once said The prediction made in the interview - "In the next 10 to 20 years, artificial intelligence systems will make it possible for non-programmer creators to use natural language instructions to develop without errors, and our world will still need a lot of programmer, but his role may change in unpredictable ways."
Reference link:
https://medium.com/@anywhichway/chatgpt- vs-copilot-vs-programmers
https://github.com/anywhichway/nano-memoize
https://github.com/planttheidea/micro-memoize
The above is the detailed content of Three PK games exposed the level of ChatGPT!. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics











DALL-E 3 was officially introduced in September of 2023 as a vastly improved model than its predecessor. It is considered one of the best AI image generators to date, capable of creating images with intricate detail. However, at launch, it was exclus

According to news from this site on August 14, during today’s August Patch Tuesday event day, Microsoft released cumulative updates for Windows 11 systems, including the KB5041585 update for 22H2 and 23H2, and the KB5041592 update for 21H2. After the above-mentioned equipment is installed with the August cumulative update, the version number changes attached to this site are as follows: After the installation of the 21H2 equipment, the version number increased to Build22000.314722H2. After the installation of the equipment, the version number increased to Build22621.403723H2. After the installation of the equipment, the version number increased to Build22631.4037. The main contents of the KB5041585 update for Windows 1121H2 are as follows: Improvement: Improved

According to news from this site on April 27, Microsoft released the Windows 11 Build 26100 preview version update to the Canary and Dev channels earlier this month, which is expected to become a candidate RTM version of the Windows 1124H2 update. The main changes in the new version are the file explorer, Copilot integration, editing PNG file metadata, creating TAR and 7z compressed files, etc. @PhantomOfEarth discovered that Microsoft has devolved some functions of the 24H2 version (Germanium) to the 23H2/22H2 (Nickel) version, such as creating TAR and 7z compressed files. As shown in the diagram, Windows 11 will support native creation of TAR

According to news on June 3, Microsoft is actively sending full-screen notifications to all Windows 10 users to encourage them to upgrade to the Windows 11 operating system. This move involves devices whose hardware configurations do not support the new system. Since 2015, Windows 10 has occupied nearly 70% of the market share, firmly establishing its dominance as the Windows operating system. However, the market share far exceeds the 82% market share, and the market share far exceeds that of Windows 11, which will be released in 2021. Although Windows 11 has been launched for nearly three years, its market penetration is still slow. Microsoft has announced that it will terminate technical support for Windows 10 after October 14, 2025 in order to focus more on

In news on April 27, Microsoft announced that it will soon release a test of a new version of Outlook for Windows client. This update mainly focuses on optimizing the calendar function, aiming to improve users’ work efficiency and further simplify daily workflow. The improvement of the new version of Outlook for Windows client lies in its more powerful calendar management function. Now, users can more easily share personal working time and location information, making meeting planning more efficient. In addition, Outlook has also added user-friendly settings, allowing users to set meetings to automatically end early or start later, providing users with more flexibility, whether they want to change meeting rooms, take a break or enjoy a cup of coffee. arrange. according to

In the second half of 2024, the official Microsoft Security Blog published a message in response to the call from the security community. The company plans to eliminate the NTLAN Manager (NTLM) authentication protocol in Windows 11, released in the second half of 2024, to improve security. According to previous explanations, Microsoft has already made similar moves before. On October 12 last year, Microsoft proposed a transition plan in an official press release aimed at phasing out NTLM authentication methods and pushing more enterprises and users to switch to Kerberos. To help enterprises that may be experiencing issues with hardwired applications and services after turning off NTLM authentication, Microsoft provides IAKerb and

According to news from this site on April 26, as we all know, Microsoft is currently trying its best to promote its AI assistant Copilot. In addition to the Copilot that comes with Windows 10/11, the Copilot function is also integrated in the Edge browser and Office. At present, Copilot still has weaknesses compared to AI tools such as GPT, but some of the functions it provides are also very practical for Windows users and Edge users, such as its own translation function. As discovered by @Leopeva64, Microsoft has added this feature to the Android version of the EdgeDev browser and is also testing it for a small number of desktop Edge users. This site points out that C

Since the launch of ChatGLM-6B on March 14, 2023, the GLM series models have received widespread attention and recognition. Especially after ChatGLM3-6B was open sourced, developers are full of expectations for the fourth-generation model launched by Zhipu AI. This expectation has finally been fully satisfied with the release of GLM-4-9B. The birth of GLM-4-9B In order to give small models (10B and below) more powerful capabilities, the GLM technical team launched this new fourth-generation GLM series open source model: GLM-4-9B after nearly half a year of exploration. This model greatly compresses the model size while ensuring accuracy, and has faster inference speed and higher efficiency. The GLM technical team’s exploration has not
