Hello,
On Wed, Feb 18, 2009 at 10:59, James Snyder <jbsnyder at fanplastic.org> wrote: > > > On Wed, Feb 18, 2009 at 02:19, James Snyder <jbsnyder at fanplastic.org>wrote: > > >> >> So, one of the things I've been doing recently is tracking timing data for >> adcscope.lua when running it. I've found certain things that increase or >> decrease the amount of time spent getting samples, but I hadn't actually >> checked what the bare minimum time would be for a dry loop like the >> following: >> > >> > term.clrscr() >> > >> > while 1 do >> > t1 = tmr.start(0) >> > t2 = tmr.read(0) >> > dtime = tmr.diff(0,t2,t1) >> > term.gotoxy(1,1) >> > term.putstr(string.format("Time (us): %06d",dtime)) >> > end >> > >> > For LM3S6965, I get 79 us. Is this correct? > > (And I've figured out that you have disabled XMODEM Xfer on your build :) Abra?osssssssssss Dado -------------- next part -------------- An HTML attachment was scrubbed... URL: https://lists.berlios.de/pipermail/elua-dev/attachments/20090218/a8454ee3/attachment.html |
OK. At least I know my compiler isn't messed up :-)
I'm curious now though whether similarly clocked ARM7 vs AVR vs Cortex- M3 (ARM Thumb2) vs etc.. do for these types of tests. -jsnyder On Feb 18, 2009, at 10:24 AM, Dado Sutter wrote: > Hello, > > On Wed, Feb 18, 2009 at 10:59, James Snyder > <jbsnyder at fanplastic.org> wrote: > > > On Wed, Feb 18, 2009 at 02:19, James Snyder > <jbsnyder at fanplastic.org> wrote: > > > So, one of the things I've been doing recently is tracking timing > data for adcscope.lua when running it. I've found certain things > that increase or decrease the amount of time spent getting samples, > but I hadn't actually checked what the bare minimum time would be > for a dry loop like the following: > > > > term.clrscr() > > > > while 1 do > > t1 = tmr.start(0) > > t2 = tmr.read(0) > > dtime = tmr.diff(0,t2,t1) > > term.gotoxy(1,1) > > term.putstr(string.format("Time (us): %06d",dtime)) > > end > > > > For LM3S6965, I get 79 us. Is this correct? > > 79us exactly in my EK-LM3S8962 too. > (And I've figured out that you have disabled XMODEM Xfer on your > build :) > > Abra?osssssssssss > Dado > > _______________________________________________ > Elua-dev mailing list > Elua-dev at lists.berlios.de > https://lists.berlios.de/mailman/listinfo/elua-dev -- James Snyder Biomedical Engineering Northwestern University jbsnyder at fanplastic.org http://fanplastic.org/key.txt ph: (847) 644-2322 -------------- next part -------------- An HTML attachment was scrubbed... URL: https://lists.berlios.de/pipermail/elua-dev/attachments/20090218/fb21a0e4/attachment.html -------------- next part -------------- A non-text attachment was scrubbed... Name: PGP.sig Type: application/pgp-signature Size: 194 bytes Desc: This is a digitally signed message part Url : https://lists.berlios.de/pipermail/elua-dev/attachments/20090218/fb21a0e4/attachment.pgp |
In reply to this post by Dado Sutter
I'll be coming back to this topic later, but for now a quick note: don't
trust the output of platform_get_time_diff_us THAT much :) At least verify what's the base clock of the timer, it will give you an idea about how accurate this measurement is. Best, Bogdan On Wed, Feb 18, 2009 at 10:15 PM, James Snyder <jbsnyder at fanplastic.org>wrote: > OK. At least I know my compiler isn't messed up :-) > I'm curious now though whether similarly clocked ARM7 vs AVR vs Cortex-M3 > (ARM Thumb2) vs etc.. do for these types of tests. > > -jsnyder > > On Feb 18, 2009, at 10:24 AM, Dado Sutter wrote: > > Hello, > > On Wed, Feb 18, 2009 at 10:59, James Snyder <jbsnyder at fanplastic.org>wrote: > >> >> > On Wed, Feb 18, 2009 at 02:19, James Snyder <jbsnyder at fanplastic.org>wrote: >> > >>> >>> So, one of the things I've been doing recently is tracking timing data >>> for adcscope.lua when running it. I've found certain things that increase >>> or decrease the amount of time spent getting samples, but I hadn't actually >>> checked what the bare minimum time would be for a dry loop like the >>> following: >>> > >>> > term.clrscr() >>> > >>> > while 1 do >>> > t1 = tmr.start(0) >>> > t2 = tmr.read(0) >>> > dtime = tmr.diff(0,t2,t1) >>> > term.gotoxy(1,1) >>> > term.putstr(string.format("Time (us): %06d",dtime)) >>> > end >>> > >>> > For LM3S6965, I get 79 us. Is this correct? >> >> > 79us exactly in my EK-LM3S8962 too. > (And I've figured out that you have disabled XMODEM Xfer on your build :) > > Abra?osssssssssss > Dado > > _______________________________________________ > Elua-dev mailing list > Elua-dev at lists.berlios.de > https://lists.berlios.de/mailman/listinfo/elua-dev > > > -- > James Snyder > Biomedical Engineering > Northwestern University > jbsnyder at fanplastic.org > http://fanplastic.org/key.txt > ph: (847) 644-2322 > > > _______________________________________________ > Elua-dev mailing list > Elua-dev at lists.berlios.de > https://lists.berlios.de/mailman/listinfo/elua-dev > > An HTML attachment was scrubbed... URL: https://lists.berlios.de/pipermail/elua-dev/attachments/20090218/c8d55019/attachment.html |
Hmm.. In this case the tmr.getclock(0) is 50,000,000.
The other thing that I certainly would assume is that tmr.read(0) takes a little time itself, so that always adds a bit. I'm just trying to understand if what I'm getting is normal, and to also get a sense for cost/benefit of using different approaches. I suppose one thing I could do is stack things up so that there are many more operations being done per timed period to make sure that the most significant source of time usage is from the timed operation and not the timers themselves :-) -jsnyder On Feb 18, 2009, at 2:19 PM, Bogdan Marinescu wrote: > I'll be coming back to this topic later, but for now a quick note: > don't trust the output of platform_get_time_diff_us THAT much :) At > least verify what's the base clock of the timer, it will give you an > idea about how accurate this measurement is. > > Best, > Bogdan > > On Wed, Feb 18, 2009 at 10:15 PM, James Snyder <jbsnyder at fanplastic.org > > wrote: > OK. At least I know my compiler isn't messed up :-) > > I'm curious now though whether similarly clocked ARM7 vs AVR vs > Cortex-M3 (ARM Thumb2) vs etc.. do for these types of tests. > > -jsnyder > > On Feb 18, 2009, at 10:24 AM, Dado Sutter wrote: > >> Hello, >> >> On Wed, Feb 18, 2009 at 10:59, James Snyder >> <jbsnyder at fanplastic.org> wrote: >> >> > On Wed, Feb 18, 2009 at 02:19, James Snyder <jbsnyder at fanplastic.org >> > wrote: >> > >> So, one of the things I've been doing recently is tracking timing >> data for adcscope.lua when running it. I've found certain things >> that increase or decrease the amount of time spent getting samples, >> but I hadn't actually checked what the bare minimum time would be >> for a dry loop like the following: >> > >> > term.clrscr() >> > >> > while 1 do >> > t1 = tmr.start(0) >> > t2 = tmr.read(0) >> > dtime = tmr.diff(0,t2,t1) >> > term.gotoxy(1,1) >> > term.putstr(string.format("Time (us): %06d",dtime)) >> > end >> > >> > For LM3S6965, I get 79 us. Is this correct? >> >> 79us exactly in my EK-LM3S8962 too. >> (And I've figured out that you have disabled XMODEM Xfer on your >> build :) >> >> Abra?osssssssssss >> Dado >> >> _______________________________________________ >> Elua-dev mailing list >> Elua-dev at lists.berlios.de >> https://lists.berlios.de/mailman/listinfo/elua-dev > > -- > James Snyder > Biomedical Engineering > Northwestern University > jbsnyder at fanplastic.org > http://fanplastic.org/key.txt > ph: (847) 644-2322 > > > _______________________________________________ > Elua-dev mailing list > Elua-dev at lists.berlios.de > https://lists.berlios.de/mailman/listinfo/elua-dev > > > _______________________________________________ > Elua-dev mailing list > Elua-dev at lists.berlios.de > https://lists.berlios.de/mailman/listinfo/elua-dev -- James Snyder Biomedical Engineering Northwestern University jbsnyder at fanplastic.org http://fanplastic.org/key.txt ph: (847) 644-2322 -------------- next part -------------- An HTML attachment was scrubbed... URL: https://lists.berlios.de/pipermail/elua-dev/attachments/20090218/d851d760/attachment-0001.html -------------- next part -------------- A non-text attachment was scrubbed... Name: PGP.sig Type: application/pgp-signature Size: 194 bytes Desc: This is a digitally signed message part Url : https://lists.berlios.de/pipermail/elua-dev/attachments/20090218/d851d760/attachment-0001.pgp |
In reply to this post by Dado Sutter
Fernando, could you run this simple script on the EK-1100 and report AVR32
performance ? We have a MOD711, with an ST711 (ARM7) too but after strugling (and achieving ! :) to make it work on Linux, OpenOCD now refuses to flash our kit :( :( :( :( Best Dado On Wed, Feb 18, 2009 at 17:15, James Snyder <jbsnyder at fanplastic.org> wrote: > OK. At least I know my compiler isn't messed up :-) > I'm curious now though whether similarly clocked ARM7 vs AVR vs Cortex-M3 > (ARM Thumb2) vs etc.. do for these types of tests. > > -jsnyder > > On Feb 18, 2009, at 10:24 AM, Dado Sutter wrote: > > Hello, > > On Wed, Feb 18, 2009 at 10:59, James Snyder <jbsnyder at fanplastic.org>wrote: > >> >> > On Wed, Feb 18, 2009 at 02:19, James Snyder <jbsnyder at fanplastic.org>wrote: >> > >>> >>> So, one of the things I've been doing recently is tracking timing data >>> for adcscope.lua when running it. I've found certain things that increase >>> or decrease the amount of time spent getting samples, but I hadn't actually >>> checked what the bare minimum time would be for a dry loop like the >>> following: >>> > >>> > term.clrscr() >>> > >>> > while 1 do >>> > t1 = tmr.start(0) >>> > t2 = tmr.read(0) >>> > dtime = tmr.diff(0,t2,t1) >>> > term.gotoxy(1,1) >>> > term.putstr(string.format("Time (us): %06d",dtime)) >>> > end >>> > >>> > For LM3S6965, I get 79 us. Is this correct? >> >> > 79us exactly in my EK-LM3S8962 too. > (And I've figured out that you have disabled XMODEM Xfer on your build :) > > Abra?osssssssssss > Dado > > _______________________________________________ > Elua-dev mailing list > Elua-dev at lists.berlios.de > https://lists.berlios.de/mailman/listinfo/elua-dev > > > -- > James Snyder > Biomedical Engineering > Northwestern University > jbsnyder at fanplastic.org > http://fanplastic.org/key.txt > ph: (847) 644-2322 > > > _______________________________________________ > Elua-dev mailing list > Elua-dev at lists.berlios.de > https://lists.berlios.de/mailman/listinfo/elua-dev > > An HTML attachment was scrubbed... URL: https://lists.berlios.de/pipermail/elua-dev/attachments/20090218/57422fdb/attachment.html |
I get 21us with this slighly modified version (of the original post):
local tmr, dtime, t1, t2 = tmr term.clrscr() while 1 do t1 = tmr.start(0) t2 = tmr.read(0) dtime = tmr.diff(0,t2,t1) term.gotoxy(1,1) term.putstr(string.format("Time (us): %06d",dtime)) end Not that bad IMO. Best, Bogdan On Wed, Feb 18, 2009 at 11:46 PM, Dado Sutter <dadosutter at gmail.com> wrote: > Fernando, could you run this simple script on the EK-1100 and report AVR32 > performance ? > > We have a MOD711, with an ST711 (ARM7) too but after strugling (and > achieving ! :) to make it work on Linux, OpenOCD now refuses to flash our > kit :( :( :( :( > > Best > Dado > > > > > > > > > On Wed, Feb 18, 2009 at 17:15, James Snyder <jbsnyder at fanplastic.org>wrote: > >> OK. At least I know my compiler isn't messed up :-) >> I'm curious now though whether similarly clocked ARM7 vs AVR vs Cortex-M3 >> (ARM Thumb2) vs etc.. do for these types of tests. >> >> -jsnyder >> >> On Feb 18, 2009, at 10:24 AM, Dado Sutter wrote: >> >> Hello, >> >> On Wed, Feb 18, 2009 at 10:59, James Snyder <jbsnyder at fanplastic.org>wrote: >> >>> >>> > On Wed, Feb 18, 2009 at 02:19, James Snyder <jbsnyder at fanplastic.org>wrote: >>> > >>>> >>>> So, one of the things I've been doing recently is tracking timing data >>>> for adcscope.lua when running it. I've found certain things that increase >>>> or decrease the amount of time spent getting samples, but I hadn't actually >>>> checked what the bare minimum time would be for a dry loop like the >>>> following: >>>> > >>>> > term.clrscr() >>>> > >>>> > while 1 do >>>> > t1 = tmr.start(0) >>>> > t2 = tmr.read(0) >>>> > dtime = tmr.diff(0,t2,t1) >>>> > term.gotoxy(1,1) >>>> > term.putstr(string.format("Time (us): %06d",dtime)) >>>> > end >>>> > >>>> > For LM3S6965, I get 79 us. Is this correct? >>> >>> >> 79us exactly in my EK-LM3S8962 too. >> (And I've figured out that you have disabled XMODEM Xfer on your build :) >> >> Abra?osssssssssss >> Dado >> >> _______________________________________________ >> Elua-dev mailing list >> Elua-dev at lists.berlios.de >> https://lists.berlios.de/mailman/listinfo/elua-dev >> >> >> -- >> James Snyder >> Biomedical Engineering >> Northwestern University >> jbsnyder at fanplastic.org >> http://fanplastic.org/key.txt >> ph: (847) 644-2322 >> >> >> _______________________________________________ >> Elua-dev mailing list >> Elua-dev at lists.berlios.de >> https://lists.berlios.de/mailman/listinfo/elua-dev >> >> > > _______________________________________________ > Elua-dev mailing list > Elua-dev at lists.berlios.de > https://lists.berlios.de/mailman/listinfo/elua-dev > > An HTML attachment was scrubbed... URL: https://lists.berlios.de/pipermail/elua-dev/attachments/20090218/07e090f8/attachment.html |
On which platform ?
Dado On Wed, Feb 18, 2009 at 18:57, Bogdan Marinescu <bogdan.marinescu at gmail.com>wrote: > I get 21us with this slighly modified version (of the original post): > > local tmr, dtime, t1, t2 = tmr > term.clrscr() > while 1 do > t1 = tmr.start(0) > t2 = tmr.read(0) > dtime = tmr.diff(0,t2,t1) > term.gotoxy(1,1) > term.putstr(string.format("Time (us): %06d",dtime)) > end > > Not that bad IMO. > > Best, > Bogdan > > > On Wed, Feb 18, 2009 at 11:46 PM, Dado Sutter <dadosutter at gmail.com>wrote: > >> Fernando, could you run this simple script on the EK-1100 and report AVR32 >> performance ? >> >> We have a MOD711, with an ST711 (ARM7) too but after strugling (and >> achieving ! :) to make it work on Linux, OpenOCD now refuses to flash our >> kit :( :( :( :( >> >> Best >> Dado >> >> >> >> >> >> >> >> >> On Wed, Feb 18, 2009 at 17:15, James Snyder <jbsnyder at fanplastic.org>wrote: >> >>> OK. At least I know my compiler isn't messed up :-) >>> I'm curious now though whether similarly clocked ARM7 vs AVR vs Cortex-M3 >>> (ARM Thumb2) vs etc.. do for these types of tests. >>> >>> -jsnyder >>> >>> On Feb 18, 2009, at 10:24 AM, Dado Sutter wrote: >>> >>> Hello, >>> >>> On Wed, Feb 18, 2009 at 10:59, James Snyder <jbsnyder at fanplastic.org>wrote: >>> >>>> >>>> > On Wed, Feb 18, 2009 at 02:19, James Snyder <jbsnyder at fanplastic.org>wrote: >>>> > >>>>> >>>>> So, one of the things I've been doing recently is tracking timing data >>>>> for adcscope.lua when running it. I've found certain things that increase >>>>> or decrease the amount of time spent getting samples, but I hadn't actually >>>>> checked what the bare minimum time would be for a dry loop like the >>>>> following: >>>>> > >>>>> > term.clrscr() >>>>> > >>>>> > while 1 do >>>>> > t1 = tmr.start(0) >>>>> > t2 = tmr.read(0) >>>>> > dtime = tmr.diff(0,t2,t1) >>>>> > term.gotoxy(1,1) >>>>> > term.putstr(string.format("Time (us): %06d",dtime)) >>>>> > end >>>>> > >>>>> > For LM3S6965, I get 79 us. Is this correct? >>>> >>>> >>> 79us exactly in my EK-LM3S8962 too. >>> (And I've figured out that you have disabled XMODEM Xfer on your build :) >>> >>> Abra?osssssssssss >>> Dado >>> >>> _______________________________________________ >>> Elua-dev mailing list >>> Elua-dev at lists.berlios.de >>> https://lists.berlios.de/mailman/listinfo/elua-dev >>> >>> >>> -- >>> James Snyder >>> Biomedical Engineering >>> Northwestern University >>> jbsnyder at fanplastic.org >>> http://fanplastic.org/key.txt >>> ph: (847) 644-2322 >>> >>> >>> _______________________________________________ >>> Elua-dev mailing list >>> Elua-dev at lists.berlios.de >>> https://lists.berlios.de/mailman/listinfo/elua-dev >>> >>> >> >> _______________________________________________ >> Elua-dev mailing list >> Elua-dev at lists.berlios.de >> https://lists.berlios.de/mailman/listinfo/elua-dev >> >> > > _______________________________________________ > Elua-dev mailing list > Elua-dev at lists.berlios.de > https://lists.berlios.de/mailman/listinfo/elua-dev > > An HTML attachment was scrubbed... URL: https://lists.berlios.de/pipermail/elua-dev/attachments/20090218/9a571462/attachment-0001.html |
Same. LM3S8962 (which is basically equivalent to LM3S6965 in terms of
performance). Best, Bogdan On Thu, Feb 19, 2009 at 12:01 AM, Dado Sutter <dadosutter at gmail.com> wrote: > On which platform ? > > Dado > > > > On Wed, Feb 18, 2009 at 18:57, Bogdan Marinescu < > bogdan.marinescu at gmail.com> wrote: > >> I get 21us with this slighly modified version (of the original post): >> >> local tmr, dtime, t1, t2 = tmr >> term.clrscr() >> while 1 do >> t1 = tmr.start(0) >> t2 = tmr.read(0) >> dtime = tmr.diff(0,t2,t1) >> term.gotoxy(1,1) >> term.putstr(string.format("Time (us): %06d",dtime)) >> end >> >> Not that bad IMO. >> >> Best, >> Bogdan >> >> >> On Wed, Feb 18, 2009 at 11:46 PM, Dado Sutter <dadosutter at gmail.com>wrote: >> >>> Fernando, could you run this simple script on the EK-1100 and report >>> AVR32 performance ? >>> >>> We have a MOD711, with an ST711 (ARM7) too but after strugling (and >>> achieving ! :) to make it work on Linux, OpenOCD now refuses to flash our >>> kit :( :( :( :( >>> >>> Best >>> Dado >>> >>> >>> >>> >>> >>> >>> >>> >>> On Wed, Feb 18, 2009 at 17:15, James Snyder <jbsnyder at fanplastic.org>wrote: >>> >>>> OK. At least I know my compiler isn't messed up :-) >>>> I'm curious now though whether similarly clocked ARM7 vs AVR vs >>>> Cortex-M3 (ARM Thumb2) vs etc.. do for these types of tests. >>>> >>>> -jsnyder >>>> >>>> On Feb 18, 2009, at 10:24 AM, Dado Sutter wrote: >>>> >>>> Hello, >>>> >>>> On Wed, Feb 18, 2009 at 10:59, James Snyder <jbsnyder at fanplastic.org>wrote: >>>> >>>>> >>>>> > On Wed, Feb 18, 2009 at 02:19, James Snyder <jbsnyder at fanplastic.org >>>>> > wrote: >>>>> > >>>>>> >>>>>> So, one of the things I've been doing recently is tracking timing data >>>>>> for adcscope.lua when running it. I've found certain things that increase >>>>>> or decrease the amount of time spent getting samples, but I hadn't actually >>>>>> checked what the bare minimum time would be for a dry loop like the >>>>>> following: >>>>>> > >>>>>> > term.clrscr() >>>>>> > >>>>>> > while 1 do >>>>>> > t1 = tmr.start(0) >>>>>> > t2 = tmr.read(0) >>>>>> > dtime = tmr.diff(0,t2,t1) >>>>>> > term.gotoxy(1,1) >>>>>> > term.putstr(string.format("Time (us): %06d",dtime)) >>>>>> > end >>>>>> > >>>>>> > For LM3S6965, I get 79 us. Is this correct? >>>>> >>>>> >>>> 79us exactly in my EK-LM3S8962 too. >>>> (And I've figured out that you have disabled XMODEM Xfer on your build >>>> :) >>>> >>>> Abra?osssssssssss >>>> Dado >>>> >>>> _______________________________________________ >>>> Elua-dev mailing list >>>> Elua-dev at lists.berlios.de >>>> https://lists.berlios.de/mailman/listinfo/elua-dev >>>> >>>> >>>> -- >>>> James Snyder >>>> Biomedical Engineering >>>> Northwestern University >>>> jbsnyder at fanplastic.org >>>> http://fanplastic.org/key.txt >>>> ph: (847) 644-2322 >>>> >>>> >>>> _______________________________________________ >>>> Elua-dev mailing list >>>> Elua-dev at lists.berlios.de >>>> https://lists.berlios.de/mailman/listinfo/elua-dev >>>> >>>> >>> >>> _______________________________________________ >>> Elua-dev mailing list >>> Elua-dev at lists.berlios.de >>> https://lists.berlios.de/mailman/listinfo/elua-dev >>> >>> >> >> _______________________________________________ >> Elua-dev mailing list >> Elua-dev at lists.berlios.de >> https://lists.berlios.de/mailman/listinfo/elua-dev >> >> > > _______________________________________________ > Elua-dev mailing list > Elua-dev at lists.berlios.de > https://lists.berlios.de/mailman/listinfo/elua-dev > > An HTML attachment was scrubbed... URL: https://lists.berlios.de/pipermail/elua-dev/attachments/20090219/c990acb5/attachment.html |
In reply to this post by Dado Sutter
This won't be as relevant, different platforms have different initial clock
speeds. The clock speed must first be set to its maximum, then the script must be run, otherwise the results won't be meaningful. It just happens that on LM3S the timer frequency is equal to the clock speed. Best, Bogdan On Wed, Feb 18, 2009 at 11:46 PM, Dado Sutter <dadosutter at gmail.com> wrote: > Fernando, could you run this simple script on the EK-1100 and report AVR32 > performance ? > > We have a MOD711, with an ST711 (ARM7) too but after strugling (and > achieving ! :) to make it work on Linux, OpenOCD now refuses to flash our > kit :( :( :( :( > > Best > Dado > > > > > > > > > On Wed, Feb 18, 2009 at 17:15, James Snyder <jbsnyder at fanplastic.org>wrote: > >> OK. At least I know my compiler isn't messed up :-) >> I'm curious now though whether similarly clocked ARM7 vs AVR vs Cortex-M3 >> (ARM Thumb2) vs etc.. do for these types of tests. >> >> -jsnyder >> >> On Feb 18, 2009, at 10:24 AM, Dado Sutter wrote: >> >> Hello, >> >> On Wed, Feb 18, 2009 at 10:59, James Snyder <jbsnyder at fanplastic.org>wrote: >> >>> >>> > On Wed, Feb 18, 2009 at 02:19, James Snyder <jbsnyder at fanplastic.org>wrote: >>> > >>>> >>>> So, one of the things I've been doing recently is tracking timing data >>>> for adcscope.lua when running it. I've found certain things that increase >>>> or decrease the amount of time spent getting samples, but I hadn't actually >>>> checked what the bare minimum time would be for a dry loop like the >>>> following: >>>> > >>>> > term.clrscr() >>>> > >>>> > while 1 do >>>> > t1 = tmr.start(0) >>>> > t2 = tmr.read(0) >>>> > dtime = tmr.diff(0,t2,t1) >>>> > term.gotoxy(1,1) >>>> > term.putstr(string.format("Time (us): %06d",dtime)) >>>> > end >>>> > >>>> > For LM3S6965, I get 79 us. Is this correct? >>> >>> >> 79us exactly in my EK-LM3S8962 too. >> (And I've figured out that you have disabled XMODEM Xfer on your build :) >> >> Abra?osssssssssss >> Dado >> >> _______________________________________________ >> Elua-dev mailing list >> Elua-dev at lists.berlios.de >> https://lists.berlios.de/mailman/listinfo/elua-dev >> >> >> -- >> James Snyder >> Biomedical Engineering >> Northwestern University >> jbsnyder at fanplastic.org >> http://fanplastic.org/key.txt >> ph: (847) 644-2322 >> >> >> _______________________________________________ >> Elua-dev mailing list >> Elua-dev at lists.berlios.de >> https://lists.berlios.de/mailman/listinfo/elua-dev >> >> > > _______________________________________________ > Elua-dev mailing list > Elua-dev at lists.berlios.de > https://lists.berlios.de/mailman/listinfo/elua-dev > > An HTML attachment was scrubbed... URL: https://lists.berlios.de/pipermail/elua-dev/attachments/20090219/4f56d54b/attachment.html |
That's true. You would want to normalize the clock rates between
different platforms as well. Also, this is more just to get a sense for what the minimum timer difference and whether that seems to vary between platforms. If you want to try a benchmark, I modified the version of the Seive of Eratosthenes (finds primes) that appears on the Lua listserv from some time ago (http://lua-users.org/lists/lua-l/1999-07/msg00087.html) to use timing on eLua, and to only search up to 2000 because otherwise you run out of memory in 64k of SRAM: function sieve(n) x = {} iter = 0 repeat x[1] = 0 i = 2 repeat x[i] = 1 i = i + 1 until i > n p = 2 while(p * p <= n) do j = p while(j <= n) do x[j] = 0 j = j + p end repeat p = p + 1 until x[p] == 1 end iter = iter + 1 until iter == 101 end print("Sieve of Eratosthenes - Lua Benchmark test") print("Start testing .....") start = tmr.start(0) sieve(2000) stop = tmr.read(0) print("Done!") print("Total Time (sec): "..tmr.diff(0,start,stop)/1000000) print("System Clock (MHz): "..cpu.clock()/1000000) print("System CPU: "..pd.cpu()) If anyone else wants to try this game, I get the following: Total Time (sec): 17.395011 System Clock (MHz): 50 System CPU: LM3S6965 If I went any higher, it seemed to run out of memory for me :-) On Feb 18, 2009, at 4:04 PM, Bogdan Marinescu wrote: > This won't be as relevant, different platforms have different > initial clock speeds. The clock speed must first be set to its > maximum, then the script must be run, otherwise the results won't be > meaningful. It just happens that on LM3S the timer frequency is > equal to the clock speed. > > Best, > Bogdan > > On Wed, Feb 18, 2009 at 11:46 PM, Dado Sutter <dadosutter at gmail.com> > wrote: > Fernando, could you run this simple script on the EK-1100 and report > AVR32 performance ? > > We have a MOD711, with an ST711 (ARM7) too but after strugling (and > achieving ! :) to make it work on Linux, OpenOCD now refuses to > flash our kit :( :( :( :( > > Best > Dado > > > > > > > > > On Wed, Feb 18, 2009 at 17:15, James Snyder > <jbsnyder at fanplastic.org> wrote: > OK. At least I know my compiler isn't messed up :-) > > I'm curious now though whether similarly clocked ARM7 vs AVR vs > Cortex-M3 (ARM Thumb2) vs etc.. do for these types of tests. > > -jsnyder > > On Feb 18, 2009, at 10:24 AM, Dado Sutter wrote: > >> Hello, >> >> On Wed, Feb 18, 2009 at 10:59, James Snyder >> <jbsnyder at fanplastic.org> wrote: >> >> > On Wed, Feb 18, 2009 at 02:19, James Snyder <jbsnyder at fanplastic.org >> > wrote: >> > >> So, one of the things I've been doing recently is tracking timing >> data for adcscope.lua when running it. I've found certain things >> that increase or decrease the amount of time spent getting samples, >> but I hadn't actually checked what the bare minimum time would be >> for a dry loop like the following: >> > >> > term.clrscr() >> > >> > while 1 do >> > t1 = tmr.start(0) >> > t2 = tmr.read(0) >> > dtime = tmr.diff(0,t2,t1) >> > term.gotoxy(1,1) >> > term.putstr(string.format("Time (us): %06d",dtime)) >> > end >> > >> > For LM3S6965, I get 79 us. Is this correct? >> >> 79us exactly in my EK-LM3S8962 too. >> (And I've figured out that you have disabled XMODEM Xfer on your >> build :) >> >> Abra?osssssssssss >> Dado >> >> _______________________________________________ >> Elua-dev mailing list >> Elua-dev at lists.berlios.de >> https://lists.berlios.de/mailman/listinfo/elua-dev > > -- > James Snyder > Biomedical Engineering > Northwestern University > jbsnyder at fanplastic.org > http://fanplastic.org/key.txt > ph: (847) 644-2322 > > > _______________________________________________ > Elua-dev mailing list > Elua-dev at lists.berlios.de > https://lists.berlios.de/mailman/listinfo/elua-dev > > > > _______________________________________________ > Elua-dev mailing list > Elua-dev at lists.berlios.de > https://lists.berlios.de/mailman/listinfo/elua-dev > > > _______________________________________________ > Elua-dev mailing list > Elua-dev at lists.berlios.de > https://lists.berlios.de/mailman/listinfo/elua-dev -- James Snyder Biomedical Engineering Northwestern University jbsnyder at fanplastic.org http://fanplastic.org/key.txt ph: (847) 644-2322 -------------- next part -------------- An HTML attachment was scrubbed... URL: https://lists.berlios.de/pipermail/elua-dev/attachments/20090218/009926b0/attachment-0001.html -------------- next part -------------- A non-text attachment was scrubbed... Name: PGP.sig Type: application/pgp-signature Size: 194 bytes Desc: This is a digitally signed message part Url : https://lists.berlios.de/pipermail/elua-dev/attachments/20090218/009926b0/attachment-0001.pgp |
In reply to this post by BogdanM
Hi,
I am using Elua on an Olimex ATSAM7X256 board.
Two ideas :
About the shell a comand like "FREE" giving the quantity of free RAM will be nice.
I dream also about a SAVE and RESTORE comand to save the program to the SD CARD or in an Eeprom.
Best regards
Georges
_______________________________________________ Elua-dev mailing list [hidden email] https://lists.berlios.de/mailman/listinfo/elua-dev |
Hello,
On Tue, Mar 3, 2009 at 05:38, georges King <[hidden email]> wrote:
Do you mean, free ram available for Lua ? Does a collectgarbage("count") in the beginning of your program solves what you want ?
We'll have it, as soon as we have our SD/mmc module fully tested and functional. Tks for the ideas.
Regards Dado
_______________________________________________ Elua-dev mailing list [hidden email] https://lists.berlios.de/mailman/listinfo/elua-dev |
It's much more complex than that I'm afraid. It depends on the allocator. But we'll need to have an implementation of such a command soon. Best, Bogdan _______________________________________________ Elua-dev mailing list [hidden email] https://lists.berlios.de/mailman/listinfo/elua-dev |
Free forum by Nabble | Edit this page |