Purebasic's Speed

Everything else that doesn't fall into one of the other PB categories.
User avatar
Frarth
Enthusiast
Enthusiast
Posts: 241
Joined: Tue Jul 21, 2009 11:11 am
Location: On the planet
Contact:

Purebasic's Speed

Post by Frarth »

Just wanted to share this to stress the speed of Purebasic.

I just finished a program that computes the positions of the planets and Moons using the huge VSOP87 dataset. Despite this dataset (almost 500kb for Mercury alone - there are 8 more) the executable is *only* 1MB in size. It also took the compiler only a second to compile close to 40,000 lines of code.

The program can search for any planetary alignment not just heliocentric or geocentric. So imagine you are on Jupiter and you want to know when the next time will be when you see Uranus and Neptune conjunct. This alignment is pretty rare. The last time it occurred was in 1991. The next time it will occur is in 2167. It took the program ONLY 5 SECONDS to find it. :D

If you have no clue as to whether or not this is fast, just have a look at the VSOP87 tables.

Image
Last edited by Frarth on Thu Mar 03, 2016 2:10 pm, edited 1 time in total.
PureBasic 5.41 LTS | Xubuntu 16.04 (x32) | Windows 7 (x64)
User avatar
Keya
Addict
Addict
Posts: 1890
Joined: Thu Jun 04, 2015 7:10 am

Re: Purebasic's Speed

Post by Keya »

Frarth wrote:So imagine you are on Jupiter and you want to know when the next time will be when you see Uranus and Neptune conjunct. This alignment is pretty rare.
that made me wonder when all planets get to closest alignment (no such thing as perfect alignment of course) ... 2492 as it turns out!
Image
The closest the eight planets will come to being aligned will be on May 6, 2492. This image shows what you would see if you were off the coast of New York City and you looked due south at 5:10 am on May 6, 2492, as calculated by the software program Stellarium 0.13.3. As you can see, the planets are not visually sitting on top of each other, which would be the case if they were all located on a line emanating from the earth (as would be needed to maximize their net gravitational force on the earth). Furthermore, they are not even visually sitting on a line in the sky. They are simply in the same general region of the sky.
http://sciencequestionswithsurprisingan ... l-line-up/
that Stellarium program is pretty cool, i used it not long ago to check whether i was seeing Mars or Venus in the early morning sky
oh, and yes PB code can be pretty damn fast :D :D
Last edited by Keya on Thu Mar 03, 2016 2:12 pm, edited 1 time in total.
User avatar
Frarth
Enthusiast
Enthusiast
Posts: 241
Joined: Tue Jul 21, 2009 11:11 am
Location: On the planet
Contact:

Re: Purebasic's Speed

Post by Frarth »

Keya wrote:
Frarth wrote:So imagine you are on Jupiter and you want to know when the next time will be when you see Uranus and Neptune conjunct. This alignment is pretty rare.
that made me wonder when all planets get to closest alignment... 2492 as it turns out!
Image
The closest the eight planets will come to being aligned will be on May 6, 2492. This image shows what you would see if you were off the coast of New York City and you looked due south at 5:10 am on May 6, 2492, as calculated by the software program Stellarium 0.13.3. As you can see, the planets are not visually sitting on top of each other, which would be the case if they were all located on a line emanating from the earth (as would be needed to maximize their net gravitational force on the earth). Furthermore, they are not even visually sitting on a line in the sky. They are simply in the same general region of the sky.
http://sciencequestionswithsurprisingan ... l-line-up/
that Stellarium program is pretty cool, i used it not long ago to check whether i was seeing Mars or Venus in the early morning sky
oh, and yes PB code can be pretty damn fast :D
Absolutely rare phenomenon!
PureBasic 5.41 LTS | Xubuntu 16.04 (x32) | Windows 7 (x64)
Post Reply