HSINGCHU, Taiwan -- Taiwan Semiconductor Manufacturing Co., the world's biggest contract chipmaker by revenue, is planning to spend more than $20 billion to build the world's most advanced 3-nanometer chip facility in Taiwan in the early 2020s, according to a senior company executive.

It will be the largest investment the Taiwanese chipmaker has ever made and highlights TSMC's relentless efforts to stay ahead of competitors including South Korea's Samsung Electronics and U.S. tech group Intel.

"This past September, we announced our plan for the world's first 3-nanometer fab located in the Tainan science park [in southern Taiwan]. This fab could cost upwards of $20 billion and represents TSMC's commitment to drive technology forward," said Mark Liu, the chipmaker's co-chief executive, at a company supplier forum on Thursday.

Semiconductors serve as the brain in a wide range of electronic devices including computers and smartphones. The smaller the nanometer measurement, the more advanced the chip -- but also the more challenging and expensive to develop.

TSMC is also looking to produce 7-nanometer chips beginning next year.

The chipmaker's announcement of the record investment came as the semiconductor industry is debating whether Moore's Law, which has become a golden rule of the electronics industry, can be sustained.

Moore's Law refers to the proposition made by Intel co-founder Gordon Moore in 1965 that every two years or so, the number of transistors on a chip will double, boosting the chip's performance.

But those transistors have now become so tiny that there are concerns about how much more it is possible to shrink them, posing a challenge for companies looking to create still faster, better chips for electronic devices.

For example, a single unit of extreme ultraviolet (EUV) equipment that is required for the future production of 7-nanometer chips can cost about $1.2 billion.

Right now in the global semiconductor industry, only TSMC, Intel and Samsung Electronics have the capacity to allocate some $10 billion in annual capital expenditure to advanced chip development, according to analysts and industry executives.

TSMC's Liu said in late 2016 that his company had assigned hundreds of engineers to develop 3-nanometer technology and research 2-nanometer technology.

Meanwhile, TSMC is accelerating the production schedule of its first-ever advanced chip facility in China, located in the southern Chinese city of Nanjing, to the first half of 2018, in order to address robust demand from Chinese customers.

"The schedule has continuously been [moved forward] because of the strong demand. As it stands now, we are to start output in May next year, five months from now," said Liu, adding that all the equipment and tools for the initial production had already been stored.

Previously TSMC had planned to start churning out 16-nanometer chips, which were used in the iPhone 7, at the Nanjing facility in the second half of 2018.

In 2016, though the company still relied on U.S.-based clients such as Apple, Qualcomm, Nvidia and others for 65% of its revenue, sales from Chinese customers grew to 9%, from 8% in 2015 and 7% in 2014.

TSMC has more than 100 China-based customers out of its total of 470 worldwide.