DEV Community

Cover image for Peregrine - A new programming language with python like syntax but as fast as c(currently under devolopment)
SaptakBhoumik
SaptakBhoumik

Posted on • Updated on

Peregrine - A new programming language with python like syntax but as fast as c(currently under devolopment)

TL;DR

Peregrine is basically a programming language with python-like syntax but it is statically typed and as fast as c made by me and my friends. It is currently under development. Repo:- https://github.com/peregrine-lang/Peregrine

About

If you know python then you most probably know that python is very easy to use but also very slow. Which is kind of annoying. To solve this me and my friends are working on a new programming language named peregrine (which is named after a bird) and their syntax is very similar. Peregrine gets transcompiled to c thus allowing it to run as fast as c. Please note that this language is still not complete. I hope you will love it

Benchmark

I have told many times that peregrine is as fast as c and to prove it I will show you some benchmark
image
Here I calculated the Fibonacci series recursively from 0 to 40 and python(left side) took 32secs whereas peregrine (right side) took only 1sec thus making it 32 times faster. Also, you can see that its syntax is very similar to that of python. For comparison here is a benchmark with c
image
And as you can see that peregrine is as fast as c(both took 1sec)

Link

Github- https://github.com/peregrine-lang/Peregrine
Thank you all for reading. If you are excited about it please star the repo and click on the watch button so that you don't miss any updates. We want to release version 0.0.1 by March so please contribute

Discussion (5)

Collapse
aatmaj profile image
Aatmaj

Have you heard of Julia programming language?

If you want to succeed, please have a look at why Julia Programming language has not yet overtaken Python or why Python has not fully overtaken Java.

All the best for your future!

Hope Swallow swallows Python. ๐Ÿ˜‰ ๐Ÿ‘

Collapse
saptakbhoumik profile image
SaptakBhoumik Author

Thanks for the suggestion:)

Collapse
saptakbhoumik profile image
SaptakBhoumik Author • Edited on
int-64bit integer
int32-32bit integer
int16-16bit integer
int8-8bit integer
uint-unsigned 64bit integer
uint32-unsigned 32bit integer
uint16-unsigned 16bit integer
uint8-unsigned 8bit integer
float-64 bit decimal
float32-32 bit decimal
char-store a character which occupies 8bit of space
str-basically a char pointer allowing you to store multiple characters
use const to define constant
Enter fullscreen mode Exit fullscreen mode

Peregrine data types

Collapse
salahratrout profile image
SalahRatrout • Edited on

Simply this article made my day !

Collapse
saptakbhoumik profile image
SaptakBhoumik Author

Thanks:)