LucasG0 commented on issue #37194:
URL: https://github.com/apache/arrow/issues/37194#issuecomment-1869644463

   I could not reproduce with the following code:
   
   ```python
   import time
   import pyarrow as pa
   
   start = time.time()
   v = ['foo', None] * 100_000_000
   s = pa.scalar(v, type=pa.list_(pa.string()))
   after_creation = time.time()
   print(f"Time to create ListScalar object: {after_creation - start}")
   _ = len(s)
   after_len_call = time.time()
   print(f"Time to len: {after_len_call - after_creation}")
   _ = pa.compute.list_value_length(s)
   print(f"Time to list_value_length: {time.time() - after_len_call}")
   
   ```
   Outputs:
   
   ```
   Time to create: 4.116701126098633
   Time to len: 6.651878356933594e-05
   Time to list_value_length: 0.0003292560577392578
   ```
   
   Time spent in `len` call looks negligible here, are there some specific 
requirements needed to reproduce the issue?
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to