M
MercyNews
Home
Back
V8 JavaScript Engine Development for RISC-V Architecture
Technology

V8 JavaScript Engine Development for RISC-V Architecture

Hacker NewsJan 7
3 min read
📋

Key Facts

  • ✓ The V8 port targets the RV64GC instruction set profile.
  • ✓ Development includes adapting the Ignition interpreter and Turbofan optimizing compiler.
  • ✓ RISC-V's weakly ordered memory model requires careful handling of memory fences.
  • ✓ The project supports pointer compression to reduce memory usage.
  • ✓ Current work focuses on performance optimization and closing the gap with x64/ARM64.

In This Article

  1. Quick Summary
  2. Porting V8 to RISC-V: Technical Foundations
  3. RISC-V Specific Challenges and Solutions
  4. Current Status and Future Outlook

Quick Summary#

The development of the V8 JavaScript engine for the RISC-V architecture is a complex engineering effort focused on adapting a high-performance runtime to a new instruction set. The porting process involves navigating the intricacies of V8's multi-tiered compilation system, which includes components like Ignition (the interpreter) and Turbofan (the optimizing compiler).

Significant technical work is required to map V8's internal operations to RISC-V's specific instruction set, particularly the RV64GC variant. This includes implementing support for the base integer instructions, standard extensions (F and D for floating-point), and the compressed instruction extension (C). The development process addresses critical challenges such as register allocation, memory ordering constraints, and the adaptation of V8's garbage collection mechanisms to work efficiently with the RISC-V memory model.

Progress has been made on the baseline compiler, establishing a functional foundation for code generation. Further work is directed towards the optimizing compiler, which requires sophisticated instruction selection and scheduling to leverage RISC-V's capabilities fully. The article details the ongoing efforts to integrate these components and achieve performance targets comparable to other supported platforms.

Porting V8 to RISC-V: Technical Foundations#

Porting the V8 JavaScript engine to a new architecture like RISC-V requires a deep understanding of both the engine's internal architecture and the target instruction set. V8 is not a monolithic entity but a complex system composed of several distinct components that must be adapted individually. The primary goal is to ensure that JavaScript code can be parsed, interpreted, compiled, and executed efficiently on RISC-V hardware.

The initial phase of the port focuses on the Ignition interpreter. Ignition generates bytecode which is then executed by a platform-specific bytecode handler. For RISC-V, this means writing assembly routines or generating machine code that implements the bytecode operations. This step is crucial for getting a basic runtime environment running, allowing simple scripts to execute.

Following the interpreter, the Turbofan optimizing compiler must be addressed. Turbofan is a sophisticated compiler that takes V8's high-level intermediate representation (IR) and generates optimized machine code. This involves several stages:

  • Instruction Selection: Mapping V8's IR nodes to specific RISC-V instructions.
  • Register Allocation: Assigning virtual registers to the physical registers available on RISC-V.
  • Instruction Scheduling: Reordering instructions to maximize pipeline efficiency on the target microarchitecture.

Furthermore, V8 relies heavily on a mechanism known as pointer compression. This technique reduces memory footprint by storing 32-bit offsets instead of full 64-bit pointers, assuming a heap size less than 4GB. Adapting this scheme for RISC-V requires ensuring that the 32-bit offsets can be correctly manipulated using RISC-V's 64-bit arithmetic instructions, which adds a layer of complexity to the porting effort.

RISC-V Specific Challenges and Solutions#

The RISC-V architecture presents unique challenges that differ from legacy architectures like x86 or ARM. One of the primary considerations is the memory model. RISC-V has a weakly ordered memory model, meaning that memory operations (loads and stores) can be reordered by the CPU unless explicit fence instructions are used. This contrasts with the stronger memory models found in other architectures.

V8's garbage collector and concurrent compilation threads rely on specific memory ordering guarantees to function correctly. The port must carefully insert appropriate memory fences or use atomic instructions where necessary to maintain data consistency. For example, when updating references to objects on the heap, the order of writes is critical to prevent race conditions.

Another significant area is the handling of atomic operations and locks. JavaScript's SharedArrayBuffer and Atomics object allow for multi-threaded programming in the browser. The underlying implementation requires hardware support for atomic read-modify-write operations (like LR/SC - Load-Reserved/Store-Conditional on RISC-V). The port must implement these primitives efficiently to support modern web applications.

The compressed instruction set (C extension) in RISC-V reduces code size by providing 16-bit encodings for common instructions. While beneficial for performance (improving instruction cache hit rates), it introduces complexity for the compiler. The Turbofan compiler needs to be aware of these compressed instructions and decide when it is optimal to use them versus the full 32-bit instructions, balancing code size against execution speed.

Current Status and Future Outlook#

As of the latest updates, the V8 on RISC-V project has achieved significant milestones. The codebase has been integrated into the main V8 repository, allowing for continuous testing and development. The project supports the RV64GC profile, which is the standard 64-bit configuration with integer, floating-point, and compressed instruction support.

Current efforts are focused on closing the performance gap between the RISC-V port and mature ports like x64 and ARM64. This involves profiling the generated code to identify bottlenecks and optimizing the instruction selection and scheduling algorithms in Turbofan. Specific areas of optimization include:

  • Improving floating-point performance.
  • Optimizing the code generated for JavaScript object property access.
  • Reducing the overhead of function calls and context switches.

Looking forward, the project aims to support future extensions of the RISC-V architecture, such as the V extension for vector processing, which could accelerate certain JavaScript workloads like image processing or machine learning inference. The continued collaboration between the RISC-V community and the V8 development team is essential for bringing high-performance JavaScript execution to the growing ecosystem of RISC-V based devices.

Continue scrolling for more

AI Transforms Mathematical Research and Proofs
Technology

AI Transforms Mathematical Research and Proofs

Artificial intelligence is shifting from a promise to a reality in mathematics. Machine learning models are now generating original theorems, forcing a reevaluation of research and teaching methods.

Just now
4 min
175
Read Article
Animoca buys Somo as NFT market rebounds early in 2026
Technology

Animoca buys Somo as NFT market rebounds early in 2026

Animoca’s Somo acquisition expands its digital collectibles strategy as NFTs show early signs of renewed trading activity.

29m
3 min
0
Read Article
China's much-hyped radars appear to have been of little help when the US launched its massive air assault against Venezuela
World_news

China's much-hyped radars appear to have been of little help when the US launched its massive air assault against Venezuela

China's JY-27A radar didn't appear to be effective during the US raid on Venezuela. US Air Force Photo Venezuela's Chinese air defense radars weren't game-changing during the US raid to capture Maduro. China has touted the effectiveness in combat of radars like its JY-27A. The lack of effect recently raises questions about both the radar and their operators. Venezuela's military had Chinese-made anti-aircraft radars available when the US launched a surprise air assault against the country to capture the country's now-former leader, Nicolás Maduro, earlier this month. They appear to have been of little help. Operation Absolute Resolve involved over 150 US military aircraft, none of which were shot down. A helicopter was hit, reportedly by machine gun fire, but remained operational. Venezuela has a number of China's JY-27A mobile radars, which Beijing has touted as top-of-the-line systems. It has said the radar can detect stealth assets, like the American F-22 and F-35, from over 150 miles away. The success of the surprise raid by US special operators into downtown Caracas, part of a larger mission which involved not only stealth airpower but also older fourth-generation aircraft and helicopters, suggests that something didn't go as planned on defense. That may be on the operators rather than the tech though. After the raid, a Japanese reporter asked a Chinese foreign ministry spokesperson what Beijing thought about the "large amount of military equipment" China sold Venezuela apparently being "of little practical use." The Chinese spokesperson responded by condemning the US strike. A destroyed air defense unit at a Venezuelan military base. Leonardo Fernandez Viloria/REUTERS The Chinese-made JY-27A is a long-range radar used for detecting and tracking hostile aircraft in protected airpsace. Introduced in 2014, the radar system consists of a radar mast with multiple antenna panels supported by separate radar and control vehicles. Chinese sources claim it has features designed to reduce jamming. A newer version, the JY-27V, has since been developed. When Venezuela purchased JY-27As from China last year, there were claims that the radars were able to lock onto multiple F-35B fighter jets off the Venezuelan coast, presenting a potential challenge to the one-way transparency advantage of the US military. "That's all well and good," Michael Sobolik, a senior fellow at the Hudson Institute, told Business Insider, "but when it really matters is in a moment of conflict." Perhaps they were unable to withstand sophisticated electromagnetic spectrum attacks, or maybe they were improperly utilized by their operators. Either way, if they weren't effective, they were of little use for air defense. Radar systems are what inform air defense crews on what they'll need to target and what weapons they need to use. "If you don't have functioning radars then you're a sitting duck," he said. US military leaders said that American aircraft were able to overwhelm Venezuelan air defenses, which has been assessed to include a range of Russian-made systems like S-300VM batteries, Buk-M2 systems, and older S-125 Pechora-2M launchers, as well as the Chinese radars. Some of these pieces are capable but aren't the newest variants used by their respective exporters. In the aftermath, Secretary of Defense Pete Hegseth mocked the effectiveness of the Russian air defenses. Nothing was said about the Chinese radars in that speech. Key to air defense is how the network works together, and the effectiveness of the operator is vital. In Venezuela's case, it may have been lacking the necessary conditions for successful air defense operations. Seven US troops were hurt during the raid in Venezuela over the weekend, a defense official said. US Air Force photo by Airman 1st Class Isabel Tanner A study from the Miami Strategic Intelligence Institute think tank, which hosts experts on Latin America, assessed Venezuela's air defenses as being in critical condition as of last year. It said that over 60% of its radar fleet was non-operational, combat aviation doesn't fly often, and the country has received little maintenance support and spare parts from its exporters. Venezuela purchased Chinese-made radars and Russian-made surface-to-air missile batteries to modernize its air defenses, but the hardware alone can't make up for internal shortcomings. Analysis by The New York Times found that some of Venezuela's air defense equipment was in storage or not operational, leaving it unprepared for the US attack. Reports also indicated Venezuela's military lacked the spare parts and technical background to keep air defense systems running. Even if the failures are on the part of the Venezuelan military, the ineffective performance of the Russian and Chinese systems sends a "pretty big message," Sobolik said. It elevates confidence in US capabilities while raising questions about those of rivals. US officials said no American aircraft or military personnel were lost during the raid on Venezuela. Of the 150 aircraft and almost 200 American troops involved in the mission, one helicopter took fire and seven troops were injured. Read the original article on Business Insider

32m
3 min
0
Read Article
One thing that might get workers to embrace AI? The 4-day workweek.
Technology

One thing that might get workers to embrace AI? The 4-day workweek.

Working fewer days might help create buy-in among workers for adopting AI, authors of a book on the four-day workweek suggest. Drew Angerer/Getty Images Adopting a four-day workweek could boost employees' support for using AI on the job. CEOs report that some workers are resisting the technology, despite firms making big investments. Authors of a book on a four-day workweek say that the setup could let workers share in AI's gains. Bosses, if you're struggling to get your people excited about AI, here's one idea: Embrace the four-day workweek. Sharing some of AI's promised efficiency gains with employees — by letting them work fewer hours, not just get more done — could help get workers on board with a technology that some fear might ultimately replace them, authors of a new book advocating for a shorter workweek told Business Insider. Letting workers put in four days' work for five days' pay would be one way to "share the rewards" of innovation and technological advancement, said Jared Lindzon, a coauthor of the book "Do More in Four." When it comes to AI, giving workers more time away from their jobs could make it more likely they'd get behind the technology "because they're getting part of that benefit," rather than standing in the way of it, he said. Joe O'Connor, Lindzon's coauthor, said that when it comes to discussions about AI in the workplace, the conversation among workers often turns to fears of job cuts. 'Cultural resistance and emotional friction' Anxiety about AI-induced layoffs might be one reason rolling out the technology has proven difficult for some companies. In an early 2025 survey of business leaders in eight countries from the IT company Kyndryl, 45% of CEOs said their workers were resisting the technology. "Cultural resistance and emotional friction" are the biggest impediments to AI adoption, Boston Consulting Group reported in 2025. That's unwelcome news for C-suite decision-makers eager to ratchet up efficiency. One in three companies is pumping at least $25 million into AI, according to BCG. Business leaders have, at times, publicly expressed their frustration over some workers' foot-dragging. Coinbase CEO Brian Armstrong said in 2025 that he'd gone "rogue" in firing some workers at the crypto exchange who didn't adopt AI after being told to do so. The head of the software company IgniteTech has, meanwhile, lamented that "changing minds was harder than adding skills." In recent years, the firm cut nearly eight in 10 workers after they failed to quickly embrace AI. Nurturing the productivity gains that many leaders seek will often require people to perform different kinds of work — especially as AI takes over some tasks, O'Connor said. He expects that demand for creativity, judgment, critical thinking, and adaptability will increase and that those "fundamentally human" traits won't be fostered by simply moving faster or working longer, he said. "It's going to be more about maximizing people's energy, maximizing people's motivation, maximizing people's well-being and recovery," O'Connor said. A four-day workweek could promote those things, he said. Some leaders expect workweeks will shrink The idea that AI could allow people to work less isn't new. For years, the technology's advocates have said it could free up humans to do more of what they love, while handing off the grunt work to bots. The CEO of startup Mechanize, for example, says the company's aim is to automate every job. That notion has led some of the biggest corporate luminaries to predict that working hours could plummet as AI adoption increases. Microsoft cofounder Bill Gates has said that time on the clock might shrink to two days, while JPMorgan's Jamie Dimon has said workweeks of 3.5 days could become a thing. Even Nvidia's Jensen Huang — known for regularly putting in 14-hour days at the chipmaker and working on holidays — has said he could see the tech allowing for more time away from the office. Politicians have weighed in, too. Vermont Senator Bernie Sanders, citing efficiency gains from technology such as AI, introduced legislation in 2024 to trim the standard workweek to 32 hours. There hasn't yet been widespread adoption of the four-day workweek, likely in part because employers wield more power in many parts of the job market. O'Connor said that while adoption of four-day setups was lower in 2025 than in 2023, when far more workers were job-hopping, more employers are opting for shorter weeks than before the pandemic upended norms about work. Not all CEOs will be ready to give up the gains Umesh Ramakrishnan, cofounder of the executive search and leadership advisory firm Kingsley Gate, told Business Insider that many leaders, himself included, would want to harness AI's productivity gains to boost a business's top and bottom lines. "If you have a day to spare, get me more revenue, get me more profit," he said, adding that while it might sound "heartless," that's simply how business works. Yet, Lindzon said, asking workers to be 20% more effective — the equivalent of a single day in a standard workweek — so that they might benefit from that boost is likely to be more effective than asking them to do it for the good of the company. "It completely changes the conversation from a 'You have to do this' to 'We get to do this together,'" he said. Do you have a story to share about your career? Contact this reporter at tparadis@businessinsider.com. Read the original article on Business Insider

35m
3 min
0
Read Article
Meta's Strategic Pivot: Reality Labs Cuts
Technology

Meta's Strategic Pivot: Reality Labs Cuts

Meta is restructuring its Reality Labs division, cutting approximately 1,000 jobs. The move signals a major strategic shift away from metaverse ambitions toward AI-powered wearables and mobile products, reshaping the company's future.

48m
5 min
4
Read Article
AI Becomes Corporate Law's Cost-Cutting Weapon
Technology

AI Becomes Corporate Law's Cost-Cutting Weapon

Corporate legal departments are aggressively deploying artificial intelligence to draft documents, monitor compliance, and reduce reliance on expensive outside law firms, creating a seismic shift in how legal services are purchased and delivered.

54m
6 min
4
Read Article
7 Best Phones You Can't Buy in the US (2026)
Technology

7 Best Phones You Can't Buy in the US (2026)

A curated selection of the most impressive smartphones that remain unavailable to American consumers, despite their advanced features and strong performance in international markets.

54m
5 min
2
Read Article
Tesla (TSLA) to stop selling Full Self-Driving package, moves to subscription-only: why it’s a big move
Technology

Tesla (TSLA) to stop selling Full Self-Driving package, moves to subscription-only: why it’s a big move

Tesla is officially killing the option to purchase its Full Self-Driving (FSD) package upfront. CEO Elon Musk announced today that the automaker will stop selling FSD as a one-time option and will instead only offer it as a monthly subscription. It marks a massive shift in Tesla’s strategy for the software, which Musk has famously claimed for years would become an “appreciating asset.” more…

55m
3 min
0
Read Article
Ex-Meta principal engineer shares 4 strategies to avoid being an underperformer
Technology

Ex-Meta principal engineer shares 4 strategies to avoid being an underperformer

Adrien Friggeri said that expectations are "tighter" in the tech industry than they were a decade ago. Adrien Friggeri Adrien Friggeri worked at Meta for over 10 years. He made it to the rank of principal software engineer. Friggeri shared four tips for avoiding low performance in the tech industry with Business Insider. "Compared with 10 years ago, there is less organizational 'slack' and expectations tend to be tighter," he wrote. Silicon Valley is raising its standards for talent. Adrien Friggeri spent over a decade combined at Meta — including back when it was called Facebook — with stints at Michael Bloomberg's Hawkfish and Clubhouse as well. Now, he works as a partner software engineer at Microsoft, according to his LinkedIn profile. The consequences of underperforming are "more drastic" now than they were 10 years ago, Friggeri said on "The Peterman Pod." In an email to Business Insider, Friggeri wrote that there is less "organizational 'slack'" and higher expectations for tech employees. "That means performance gaps are identified and addressed faster, and if someone is not meeting clearly defined expectations over time, the path to a formal performance-management process (and potentially a role change or exit) can be shorter than it used to be," Friggeri wrote. Meta has been especially strict with its performance expectations. The tech giant laid off roughly 3,600 employees in February, labeling them low performers. There are also benefits to being above the pack. Meta is introducing higher bonuses for top performers, Business Insider reported on Monday. In his email, Friggeri clarified that the trend was not specific to Meta. Rather, it was industry-wide and reflected the state of the market. Meta did not respond to a request for comment. Friggeri shared four tips with Business Insider to stay ahead and avoid underperformance. 1.) Workers should make expectations explicit. "Align with your manager on priorities and what 'great' looks like for the next 30/60/90 days," Friggeri wrote. 2.) Employees should seek out feedback. They shouldn't wait for review cycles, Friggeri wrote. Feedback should be sought out "early and often." 3.) Focus on "visible, high-leverage work." "Pick projects tied to clear outcomes and communicate progress, risks, and tradeoffs," he wrote. 4.) Keep investing in your skills Friggeri wrote that employees should "treat learning as part of the job, especially as teams and priorities shift." On the podcast, Friggeri advocated for being independent and building new projects — and not being silent about them. It's not helpful to "lock yourself in a room," build for three months, and show up with the finished product. "Overcommunicate is really the strategy I would recommend," he said. Read the original article on Business Insider

1h
3 min
0
Read Article
Technology

Полное руководство по кибербезопасности для малого бизнеса

Малый бизнес все чаще становится мишенью для киберпреступников. В этом руководстве мы собрали практические шаги для защиты ваших цифровых активов, от управления паролями до обучения команды.

1h
5 min
8
Read Article
🎉

You're all caught up!

Check back later for more stories

Back to Home