Click here to Skip to main content
15,886,199 members
Articles / High Performance Computing / Vectorization

Bird Programming Language: Part 1

Rate me:
Please Sign up or sign in to vote.
4.92/5 (129 votes)
1 Jan 2013GPL312 min read 377.2K   2.7K   153  
A new general purpose language that aims to be fast, high level and simple to use.
Strict

Framework Brl.StandardIO
Import Brl.Max2D
Import Brl.GLMax2D
Import Brl.GLGraphics

Import "PerfTest.s"
Import "..\AsLibs.a"
Import "PerfTest.o"

Extern
Function GccEntry() "C"
Function InitAsThread() "C"
Function AsEntry() "Win32"
EndExtern

Function LNKO(i, j)
	While i <> j
		If i > j Then i :- j..
		Else j :- i
	Wend
	
	Return i
EndFunction

Print "BlitzMax:"
BeginPerf

Local Ret = 0
For Local i = 1 To 25000
	For Local j = 1 To 25000
		Ret :+ LNKO(i, j)
	Next
Next

EndPerf
PrintInt Ret
Print
	
Print "Gcc:"
GccEntry
Print

Print "Anonymus:"
InitAsThread
AsEntry
Print

Global Ms
Function BeginPerf()
	Ms = MilliSecs()
EndFunction

Function EndPerf()
	Ms = MilliSecs() - Ms
	Print "Time: " + String(Float(Ms) / 1000#)
EndFunction

Function PrintInt(x)
	Print x
EndFunction

Function PrintLong(x:Long)
	Print x
EndFunction

Function PrintDouble(x:Double)
	Print x
EndFunction

Function NewLine()
	Print
EndFunction

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The GNU General Public License (GPLv3)


Written By
Software Developer
Hungary Hungary
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions