Author Topic: Grid point list conversion  (Read 7678 times)

0 Members and 2 Guests are viewing this topic.

ronjonp

  • Needs a day job
  • Posts: 7526
Re: Grid point list conversion
« Reply #30 on: September 16, 2020, 03:26:36 PM »
Strange .. when I run the test you created 'c:rjpfoounfoldmatrix' with 50x50 speed is waaay faster than what you posted (AutoCAD 2021)
Quote
Elapsed time : 234.0000000000000 milliseconds...
may i ask you the same thing, Ron?
https://www.theswamp.org/index.php?topic=56239.msg601499#msg601499
Sure :)
Quote
Command: RJPFOOUNFOLDMATRIX
Specify number of rows of matrix : 50
Specify number of columns of matrix : 50
Elapsed time : 16.00000000000000 milliseconds...

Command: RECUNFOLDMATRIX
Specify number of rows of matrix : 50
Specify number of columns of matrix : 50
Elapsed time : 1438.000000000000 milliseconds...

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

VovKa

  • Water Moccasin
  • Posts: 1626
  • Ukraine
Re: Grid point list conversion
« Reply #31 on: September 16, 2020, 06:22:41 PM »
Sure :)
Quote
Command: RJPFOOUNFOLDMATRIX
Specify number of rows of matrix : 50
Specify number of columns of matrix : 50
Elapsed time : 16.00000000000000 milliseconds...

Command: RECUNFOLDMATRIX
Specify number of rows of matrix : 50
Specify number of columns of matrix : 50
Elapsed time : 1438.000000000000 milliseconds...

That it is :) ... I like your numbers better   :2funny:
1+

VovKa

  • Water Moccasin
  • Posts: 1626
  • Ukraine
Re: Grid point list conversion
« Reply #32 on: September 16, 2020, 06:33:40 PM »
I wanted to add that it can also vary with the CAD software.
(BRUNO_F MLIST) is doing
524288 iterations for 1266 ms on Bricscad
and
32768 iterations for 1094 ms on Acad

looks like Bricscad is almost 14 times faster :)
cool

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Grid point list conversion
« Reply #33 on: September 16, 2020, 10:28:59 PM »
looks like Bricscad is almost 14 times faster :)

Awesome but I would have anticipated more. 🚀
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

Marc'Antonio Alessi

  • Swamp Rat
  • Posts: 1451
  • Marco
Re: Grid point list conversion
« Reply #34 on: September 17, 2020, 02:15:20 AM »
I wanted to add that it can also vary with the CAD software.
(BRUNO_F MLIST) is doing
524288 iterations for 1266 ms on Bricscad
and
32768 iterations for 1094 ms on Acad

looks like Bricscad is almost 14 times faster :)
cool
AutoCAD 2021 t's even slower...
Code: [Select]
Elapsed milliseconds / relative speed for 32768 iteration(s):
    (BRUNO_F MLIST).....1829 / 1.21 <fastest>
    (SQUARE MLIST)......2219 / 1 <slowest>

Elapsed milliseconds / relative speed for 32768 iteration(s):
    (_RJPFOO MLIST).....1547 / 2.79 <fastest>
    (BRUNO_F MLIST).....1890 / 2.28
    (SQUARE MLIST)......2328 / 1.85
    (VOVKA_F MLIST).....4313 / 1 <slowest>

ribarm

  • Gator
  • Posts: 3225
  • Marko Ribar, architect
Re: Grid point list conversion
« Reply #35 on: September 17, 2020, 02:20:27 AM »
Considering results from my PC, I somehow don't believe to yours Ron... But IMHO, if OP would need matrix more than 50x50 elements I guess he is in nasty problems with his job... Around 1 second is very acceptable timing for a PC and this task... And like I said all proposed functions are good and suitable for this task and I agree with Stefan and his perception...
So my kudos go to Stefan 1+.
Marko Ribar, d.i.a. (graduated engineer of architecture)

:)

M.R. on Youtube

ronjonp

  • Needs a day job
  • Posts: 7526
Re: Grid point list conversion
« Reply #36 on: September 17, 2020, 11:12:11 AM »
Considering results from my PC, I somehow don't believe to yours Ron...
Yeah the numbers seem strange to me too but I'm just running the test you put together.  :wink:

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

Grrr1337

  • Swamp Rat
  • Posts: 812
Re: Grid point list conversion
« Reply #37 on: September 17, 2020, 03:40:54 PM »
Thank you everyone for your contribution!
Indeed I was (and I'm still) busy in real life, agreed that it seems somewhat discrespectful for not replying on time.
Could've spent a few days figuring it out myself, but then I thought it may be better to post it here -
after all the task is related to a bit challenging list manipulation, while I knew I could rely on some of you.
Personally I don't get mad at the times when I provide a solution to an non-replying OP (like in this thread) rather just letting it sink in the web.
Surely I had the time to reply with just "thanks", which would seem more rude for me instead of non-replying -
because its like someone hands you a cigarette: while for a quick question it might be ok, for an algorithmic solution its not.

BTW I do code in my free time as an aside hobby (not making any $ out of it, but maybe as a part-time draughtsman - which is still not alot),
so not solving anything particular for a client - its more like a self-development thing.

My grid is max around 12x12, but we all agree that more and faster is better.
...nobody dropped the million dollar question for the potential usage of this sub.  :idea:
(apply ''((a b c)(a b c))
  '(
    (( f L ) (apply 'strcat (f L)))
    (( L ) (if L (cons (chr (car L)) (f (cdr L)))))
    (72 101 108 108 111 32 87 111 114 108 100)
  )
)
vevo.bg

wizman

  • Bull Frog
  • Posts: 290
Re: Grid point list conversion
« Reply #38 on: September 18, 2020, 01:44:03 AM »
Thank you everyone for your contribution!
Indeed I was (and I'm still) busy in real life, agreed that it seems somewhat discrespectful for not replying on time.
Could've spent a few days figuring it out myself, but then I thought it may be better to post it here -
after all the task is related to a bit challenging list manipulation, while I knew I could rely on some of you.
Personally I don't get mad at the times when I provide a solution to an non-replying OP (like in this thread) rather just letting it sink in the web.
Surely I had the time to reply with just "thanks", which would seem more rude for me instead of non-replying -
because its like someone hands you a cigarette: while for a quick question it might be ok, for an algorithmic solution its not.

BTW I do code in my free time as an aside hobby (not making any $ out of it, but maybe as a part-time draughtsman - which is still not alot),
so not solving anything particular for a client - its more like a self-development thing.

My grid is max around 12x12, but we all agree that more and faster is better.
...nobody dropped the million dollar question for the potential usage of this sub.  :idea:

Thank you for your response.
May i ask the application of this?  Do you need only 2x2 square?

Grrr1337

  • Swamp Rat
  • Posts: 812
Re: Grid point list conversion
« Reply #39 on: September 18, 2020, 01:52:47 PM »
...

Thank you for your response.
May i ask the application of this?

I was writing some distributed scattering...
(apply ''((a b c)(a b c))
  '(
    (( f L ) (apply 'strcat (f L)))
    (( L ) (if L (cons (chr (car L)) (f (cdr L)))))
    (72 101 108 108 111 32 87 111 114 108 100)
  )
)
vevo.bg