DEV Community 👩‍💻👨‍💻

Yuki Kimoto - SPVM - Perl Club
Yuki Kimoto - SPVM - Perl Club

Posted on

The experiment of SPVM::Thread is started today.

The experiment of SPVM::Thread is started today.

SPVM::Thread is a thread module to bind C++'s thread library.

The experiment of binding C++'s thread library to SPVM is shown on the Thread.cpp.

What is the purpose of SPVM::Thread?

What is the purpose of SPVM::Thread?

Users say "Perl's thread is broken"

Users have continued to say "Perl's thread is broken".

The answer is yes and no.

Perl have ithread as a thread feature.

Users think "Perl has thread. My program will become faster using thread."

Users try to Perl's ithread. After the trial, they are disappointed because their program will not gain the performance.

From some point, Perl's official document doesn't recommend ithread to users.

Is Perl's ithread broken?

No, but users can't get the gaining of the performance.

If "ithread" was named "Thread for the emulation of fork (Mainly used for Windows fork emulation)", user never used ithread as a thread to gain performance.

In fact, Perl doesn't have the thread to gain performance.

SPVM::Tread gives users the gaining of the performance

SPVM::Tread will give users the gaining of the performance.

Users will run the codes of SPVM on the thread which internal implementation is C++'s thread.

SPVM is designed to run the codes on thread in theory. The practical experiment is started today. The method of the SPVM has the stack of 4096 bytes per thread. Global things are nothing unlike Perl.

The method of SPVM can be called from Perl. Perl realize the real thread through SPVM.

Top comments (0)

We are hiring! Do you want to be our Senior Platform Engineer? Are you capable of chipping in across sysadmin, ops, and site reliability work, while supporting the open source stack that runs DEV and other communities?

This role might just be for you!

Apply now