Jump to content

Recommended Posts

Posted

So AutoIt does not have a good (fast) solution for things like:

  • taking part of an array as a new array
  • adding element(s) at the start or middle of the array

In general array manipulation requires a loop, not a fast solution in AutoIt.

 

I'm thinking using IDispatch to handle variable transfer between normal variables and the raw variant pointers.

And fasm to do the array manipulation, importing the OleAut32 functions for variant manipulation.

 

I expect this solution to be fast, and only require AutoIt and a fasm DLL, to work.

My biggest issue currently is my lack of experience with ASM. I could try to throw something together, but would prefer help from someone, who actually knows what they are doing :P 

 

Any feedback on this idea is appreciated :)

Posted

Creating a generic DLL that could do about everything _Array* is offering would be nice but not really useful.  Not much users would like to have an unknown DLL to perform faster when it is rarely required.   Anyway good luck with this project.

Posted
1 hour ago, genius257 said:

In general array manipulation requires a loop, not a fast solution in AutoIt.

Ok, what size array/dimensions are you thinking of ?, what frequent use ?.
If the array is small, is not that slow ( for AutoIt ) but, ... what circumstances would require lightning fast array manipulation ?

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting.
autoit_scripter_blue_userbar.png

Posted
9 hours ago, genius257 said:

things like:

  • taking part of an array as a new array
  • adding element(s) at the start or middle of the array

What you describe is called a doubly-linked list (a boost example is here, tutorial here). No need for assembly; highly optimised code for that already exists in several languages.

Posted
14 hours ago, DreamOn said:

Creating a generic DLL that could do about everything _Array* is offering would be nice but not really useful.  Not much users would like to have an unknown DLL to perform faster when it is rarely required.   Anyway good luck with this project.

I would say fasm is a known DLL. the generated code COULD be a DLL, but I'm thinking sticking with executable memory for now.
The appeal would only be when working with big arrays.

Thanks :D

 

14 hours ago, argumentum said:

Ok, what size array/dimensions are you thinking of ?, what frequent use ?.
If the array is small, is not that slow ( for AutoIt ) but, ... what circumstances would require lightning fast array manipulation ?

Ideally any size array and number of dimensions, but for proof of concept code, 1D arrays would be the target.
Not sure about frequent use, but a neat solution when working with big arrays.
I agree that small arrays would not benefit from my idea at all. I would argue there are situations where people are working with big arrays, and the issue with acceptable speed limits the projects that AutoIt would be chosen for?

 

5 hours ago, RTFC said:

What you describe is called a doubly-linked list (a boost example is here, tutorial here). No need for assembly; highly optimised code for that already exists in several languages.

Yes and no. Ideal data structures and code for handling those cases, but the syntax suffers in AutoIt, since array access syntax is limited to a few types. If AutoIt supported array access syntax via an interface, i would go with that.

The idea is something that can be used in already existing code, without requiring a complete rewrite or converting to and from the underlying safearray.

Posted

AutoIt was never really built for speed — it’s an interpreted language, great for scripting and automation, but not exactly a high-performance engine under the hood. So trying to make it handle things like fast array slicing or inserting elements mid-array feels a bit like teaching a car to fly or haul 30 tons. Sure, maybe you could pull it off with enough creativity (and duct tape), but if you want to fly, you take a plane. If you want to haul heavy stuff, get a truck. Same with programming — sometimes it's better to just pick a faster compiled language for the job.

That said, I love seeing people push the boundaries of what AutoIt can do. Using FASM, COM, and clever hacks to get more out of it is impressive, and if it helps you learn or build something cool — go for it! Just don’t forget the core strengths of AutoIt: simplicity, ease of use, and rapid development. Sometimes it’s okay to let the car be a car. 😊

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...