Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update arraynew.json #1645

Merged
merged 2 commits into from
Mar 27, 2024
Merged

Update arraynew.json #1645

merged 2 commits into from
Mar 27, 2024

Conversation

pczarn2
Copy link
Contributor

@pczarn2 pczarn2 commented Mar 26, 2024

Correct default value for isSynchronized argument; remove no longer working link to Adobe white paper; correct Create unsynchronized array example. Reference: https://helpx.adobe.com/coldfusion/cfml-reference/coldfusion-functions/functions-a-b/arraynew.html

Correct default value for isSynchronized argument; remove no longer working link to Adobe white paper; correct Create unsynchronized array example. Reference: https://helpx.adobe.com/coldfusion/cfml-reference/coldfusion-functions/functions-a-b/arraynew.html
@pfreitag
Copy link
Member

@pczarn2 - did you check to see if there is another link to that PDF, perhaps archive.org may have it?

@pczarn2
Copy link
Contributor Author

pczarn2 commented Mar 27, 2024

@pfreitag Adobe's own website has the link, but that link is broken (https://helpx.adobe.com/coldfusion/white-papers.html). Archive.org has the webpage, but the link to PDF is broken there as well. There were other pages that have the same broken link. I did find some working links here, but it's in Japanese, so not too useful to me :) Not sure where else to check.

https://www.google.com/search?q=CF2016_Performance.pdf&oq=CF2016_Performance.pdf&gs_lcrp=EgZjaHJvbWUyBggAEEUYOTIGCAEQRRg8MgYIAhBFGDzSAQc3MThqMGoxqAIAsAIA&sourceid=chrome&ie=UTF-8

@zspitzer
Copy link
Contributor

We should be careful about citing performance stats, whilst it makes theoretical sense, it seems to be way overstated?

https://trycf.com/gist/7e7c04ef1614adf9bea423f67d0e007a/lucee5?theme=monokai

I see little difference in this little microtest with 50k appends? also seems the named parameters don't work in ACF 2023? (there's also acf uses dimensions, lucee has dimension)

@pczarn2
Copy link
Contributor Author

pczarn2 commented Mar 27, 2024

@KamasamaK Thanks for finding the reference!

@zspitzer without named params, this code works with ColdFusion engines:

a = arrayNew(1,false);
// Implicit array notation
a.append([]);
// with values
a.append( [
'a','b',
3, 4,
[],
{complex: true},
queryNew("id,date")
] );
writedump(a);

Updated link to CF2016 Performance study pdf
@pczarn2
Copy link
Contributor Author

pczarn2 commented Mar 27, 2024

@pfreitag Pete, I added back the link with the archived version @KamasamaK found. Can you merge the change?

@KamasamaK
Copy link
Contributor

KamasamaK commented Mar 27, 2024

@zspitzer

seems the named parameters don't work in ACF 2023? (there's also acf uses dimensions, lucee has dimension)

I am seeing that named parameters are working fine in ACF 2023. You are correct about the name difference with Lucee. Seems like the addition of an alias would be the way to go there.

@pczarn2

without named params, this code works with ColdFusion engines: ...

I am surprised that works in Lucee as well since Lucee has type as its second parameter. I wonder if it has a compatibility consideration where if it detects a Boolean value then it uses the signature with synchronized as the second parameter.

@zspitzer
Copy link
Contributor

@KamasamaK https://luceeserver.atlassian.net/browse/LDEV-4822 :)

@pfreitag pfreitag merged commit 4ccf00b into foundeo:master Mar 27, 2024
4 checks passed
@pfreitag
Copy link
Member

Merged the PR thanks @pczarn2!

Though I am now wondering if the performance is quite overstated based on what @zspitzer is saying but also on an article I found where @aliaspooryorik tested the feature, and didn't see much difference: https://coldfusion.adobe.com/2019/03/look-unsynchronised-arrays-cfml/

At the very least we should probably add an allegedly to the performance claims.

@zspitzer
Copy link
Contributor

Aka, here's a useless rabbit hole, enjoy!

@aliaspooryorik
Copy link
Contributor

Yeah - I did ask how they got that 90% performance increase but didn't hear back so none the wiser I'm afraid!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants