# Built-In Preprocessor for context arguments

**URL:** <https://swi-prolog.discourse.group/t/built-in-preprocessor-for-context-arguments/5423>\
**Category:** Discussion\
**Created:** [May 24, 2022, 4:06am UTC](https://swi-prolog.discourse.group/t/built-in-preprocessor-for-context-arguments/5423 "2022-05-24T04:06:00Z")\
**Posts on this page:** 3\
**Page:** 2

<div class="post-metadata">

**Author:** ![jeshan](https://avatars.discourse-cdn.com/v4/letter/j/4da419/32.png) [@jeshan](https://swi-prolog.discourse.group/u/jeshan)\
**Post date:** [June 9, 2022, 3:29am UTC](https://swi-prolog.discourse.group/t/built-in-preprocessor-for-context-arguments/5423/26 "2022-06-09T03:29:46Z")

</div>

> [@grossdan](#):
>
> making the code less “exposed” to indexing, i think.

I think it would already be not eligible for argument indexing since it’d add arguments on the right while SWI indexes only on the first, right?

If I understood the previous correctly, then Eclipse may be a better fit here since I understood they can JIT figure out the argument best suitable for indexing (but maybe my point is irrelevant if it really considers only simple type tests):

> <https://stackoverflow.com/questions/29605132/first-argument-indexing/29853535#29853535>

---

<div class="post-metadata">

**Author:** ![grossdan](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/grossdan/32/23_2.png) [@grossdan](https://swi-prolog.discourse.group/u/grossdan)\
**Post date:** [June 9, 2022, 3:31am UTC](https://swi-prolog.discourse.group/t/built-in-preprocessor-for-context-arguments/5423/27 "2022-06-09T03:31:54Z")

</div>

I think SWI-Prolog (JIT) indexes across all arguments – not sure how far down it does “deep” indexing into compound arguments …

---

<div class="post-metadata">

**Author:** ![jeshan](https://avatars.discourse-cdn.com/v4/letter/j/4da419/32.png) [@jeshan](https://swi-prolog.discourse.group/u/jeshan)\
**Post date:** [June 9, 2022, 4:51am UTC](https://swi-prolog.discourse.group/t/built-in-preprocessor-for-context-arguments/5423/28 "2022-06-09T04:51:10Z")

</div>

right. I was mistaken.

> SWI-Prolog provides‘just-in-time’ indexing over multiple arguments

[https://www.swi-prolog.org/pldoc/man?section=jitindex](https://www.swi-prolog.org/pldoc/man?section=jitindex)

[Previous page](https://swi-prolog.discourse.group/t/built-in-preprocessor-for-context-arguments/5423.md?page=1)
